CorentinJ / Real-Time-Voice-Cloning

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

How to deal with this bug? #1271

Open Tang15948660043 opened 8 months ago

Tang15948660043 commented 8 months ago

TypeError: melspectrogram() takes 0 positional arguments but 2 positional arguments (and 2 keyword-only arguments) were given

Tang15948660043 commented 8 months ago

TypeError: melspectrogram() 采用 0 个位置参数,但给出了 2 个位置参数(和 2 个仅关键字参数) Real-Time-Voice-Cloning-master\encoder\audio.py", line 58, in wav_to_mel_spectrogram frames = librosa.feature.melspectrogram(

xianxiayeshixia commented 7 months ago

I encountered the same problem

danc403 commented 6 months ago

I just started tinkering with this so I'm sure there will be more errors to find but it is a version problem I think.

In encoder/audio.py line 58 The line frames = librosa.feature.melspectrogram(wav, sampling_rate, ...) uses positional arguments..., which is incompatible with the newer librosa version you're using. Change wav and sampling_rate to: y=wav, and sr=sampling_rate

That got it to run for me.