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: resample() takes 1 positional argument but 3 were given #1426

Closed
tianrking opened this issue Feb 8, 2022 · 1 comment · Fixed by #1432
Closed

TypeError: resample() takes 1 positional argument but 3 were given #1426

tianrking opened this issue Feb 8, 2022 · 1 comment · Fixed by #1432
Labels

Comments

@tianrking
Copy link

ENV
Ubuntu 18.04.6 LTS
paddleaudio 0.1.0 pypi_0 pypi
paddlenlp 2.2.4 pypi_0 pypi
paddlepaddle 2.2.2 pypi_0 pypi
paddlespeech 0.1.1 pypi_0 pypi
paddlespeech-ctcdecoders 0.1.1 pypi_0 pypi
paddlespeech-feat 0.1.0 pypi_0 pypi

I dont know why the same code and env can run on another server.

[2022-02-08 16:25:19,939] [ ERROR] - resample() takes 1 positional argument but 3 were given
Traceback (most recent call last):
File "/home/tianrking/anaconda3/envs/fastapi/lib/python3.7/site-packages/paddlespeech/cli/asr/infer.py", line 414, in execute
decode_method, force_yes, device)
File "/home/tianrking/anaconda3/envs/fastapi/lib/python3.7/site-packages/paddlespeech/cli/utils.py", line 335, in _warpper
return executor_func(self, *args, **kwargs)
File "/home/tianrking/anaconda3/envs/fastapi/lib/python3.7/site-packages/paddlespeech/cli/asr/infer.py", line 439, in call
self.preprocess(model, audio_file)
File "/home/tianrking/anaconda3/envs/fastapi/lib/python3.7/site-packages/paddlespeech/cli/asr/infer.py", line 256, in preprocess
self.sample_rate)
TypeError: resample() takes 1 positional argument but 3 were given

@yt605155624
Copy link
Collaborator

yt605155624 commented Feb 9, 2022

I think it's caused by the Incompatible upgrade of librosa (the release 0.9.0 2 days ago, we use 0.8.1)
You can edit your code as the following, or install librosa 0.8.1, we will try to fix this soon
image

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

Successfully merging a pull request may close this issue.

2 participants