CorentinJ / Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
51.54k stars 8.64k forks source link

Error during Demo PY #1234

Open onibanken opened 12 months ago

onibanken commented 12 months ago

Hi Corentin,

When I am testing demo.py I keep getting this error message

Traceback (most recent call last): File "C:\Users\garne\real-time-voice-cloning\demo_cli.py", line 80, in encoder.embed_utterance(np.zeros(encoder.sampling_rate)) File "C:\Users\garne\real-time-voice-cloning\encoder\inference.py", line 144, in embed_utterance frames = audio.wav_to_mel_spectrogram(wav) File "C:\Users\garne\real-time-voice-cloning\encoder\audio.py", line 58, in wav_to_mel_spectrogram frames = librosa.feature.melspectrogram( TypeError: melspectrogram() takes 0 positional arguments but 2 positional arguments (and 2 keyword-only arguments) were given

I have installed all the requirements though.

Thank you and cheers.

David

theClawsmos commented 12 months ago

Hi onibanken,

The error message you shared suggests that there is an issue with the usage of the melspectrogram() function from the library (probably librosa). It appears that you are passing more arguments than the function wants.

To resolve this error, you need to ensure that you are passing the correct arguments to the melspectrogram() function. Based on the traceback error, the problematic line is in the audio.py file, specifically in the wav_to_mel_spectrogram() function.

If you want me to help you further, I need to see the code snippet. More specifically, where the wav_to_mel_spectrogram() function is defined (probably in audio.py). That code (if provided) could be very helpful.

Cheers,

theClawsmos

P.S. Nice :) You got issue 1234

image
onibanken commented 12 months ago

Thank you Clawsmos, let me check it again and LOL proud to claim the issue #1234 :D

theClawsmos commented 12 months ago

Np :)

IgorCulafic commented 11 months ago

Any solution to this?

imgonewild commented 11 months ago

@IgorCulafic https://github.com/CorentinJ/Real-Time-Voice-Cloning/issues/1166