resemble-ai / Resemblyzer

A python package to analyze and compare voices with deep learning
Apache License 2.0
2.66k stars 419 forks source link

Error while using Resemblyzer #80

Closed Waseem-786 closed 1 year ago

Waseem-786 commented 1 year ago

Code: from resemblyzer import VoiceEncoder, preprocess_wav from pathlib import Path

Load the voice encoder

encoder = VoiceEncoder()

Load the audio files

fpath1 = Path("Ali.wav") fpath2 = Path("Waseem.wav") wav1 = preprocess_wav(fpath1) wav2 = preprocess_wav(fpath2)

Get the embeddings for the audio files

embed1 = encoder.embed_utterance(wav1) embed2 = encoder.embed_utterance(wav2)

Compute the similarity between the two embeddings

similarity = embed1 @ embed2 print(f"Similarity: {similarity:.2f}")

Error: Loaded the voice encoder model on cpu in 0.10 seconds. Traceback (most recent call last): File "D:\Complete_Python\Python\Audio File\main.py", line 9, in wav1 = preprocess_wav(fpath1) File "F:\Anaconda\lib\site-packages\resemblyzer\audio.py", line 33, in preprocess_wav wav = librosa.resample(wav, source_sr, sampling_rate) TypeError: resample() takes 1 positional argument but 3 were given

FranBasili commented 1 year ago

See the changes mades in #71 and make them manually in your PC or notebook. They have update the git repository but they haven't update it in pip

CorentinJ commented 1 year ago

I've made a push, please reopen the issue if you encounter any problem

https://pypi.org/project/Resemblyzer/0.1.2/