Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: load() takes 1 positional argument but 2 were given #1166

Open
enlightenight opened this issue Feb 20, 2023 · 11 comments
Open

TypeError: load() takes 1 positional argument but 2 were given #1166

enlightenight opened this issue Feb 20, 2023 · 11 comments

Comments

@enlightenight
Copy link

Hello,

I have done everything so far, but when I'm trying to load from the LibreSpeech samples, this is the error I get.

Arguments:
datasets_root: datasets_root
models_dir: saved_models
cpu: False
seed: None

Traceback (most recent call last):
File "/Users/XYZ/Documents/real-time-voice-cloning/toolbox/init.py", line 76, in
self.ui.browser_load_button.clicked.connect(lambda: self.load_from_browser())
File "/Users/XYZ/Documents/real-time-voice-cloning/toolbox/init.py", line 157, in load_from_browser
wav = Synthesizer.load_preprocess_wav(fpath)
File "/Users/XYZ/Documents/real-time-voice-cloning/synthesizer/inference.py", line 136, in load_preprocess_wav
wav = librosa.load(str(fpath), hparams.sample_rate)[0]
TypeError: load() takes 1 positional argument but 2 were given

What should I do?

@yallavaibhav
Copy link

yallavaibhav commented Feb 21, 2023

I have the same issue

image

@KhangTimm
Copy link

I seemed to have this problem too and it had something to do with the updated version of the librosa package. Installing an older version of librosa solved my problem:

pip install librosa==0.9.2

@SayedDubai
Copy link

Solved my error by reinstalling librosa

@umangkalavadiya
Copy link

pip install librosa==0.9.2

solved my error using this.

@DnRamirez
Copy link

Solved error by doing this.

@XRone99
Copy link

XRone99 commented Apr 19, 2023

worked for me too

@voilentKiller0
Copy link

solved my problem too

@pranavtushar
Copy link

Hey with the new update of librosa, you have to specify the argument name, it will work.

@poojuaj
Copy link

poojuaj commented Sep 8, 2023

solved my issues too thank you

@Thoufeeq2k
Copy link

i cant solve this even after installing librosa 0.9.2, i downgraded to 0.8.0 too
can anyone tell what version of python you were using pls

@csipapicsa
Copy link

I have the same problem for me 0.9.2 doesn't solve the problem. Problably

Installing collected packages: numpy, librosa
librosa-0.9.2
numpy-2.0.2

harmonic, _ = librosa.effects.hpss(y)

stft = core.stft(y)

img = librosa.display.specshow(librosa.amplitude_to_db(S,
212 ... ref=np.max),
213 ... y_axis='log', x_axis='time', ax=ax)

pad_center() takes 1 positional argument but 2 were given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests