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: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given #25

Open
BanananaFish opened this issue Jun 28, 2023 · 4 comments

Comments

@BanananaFish
Copy link

D:\code\MakeItTalk\main_end2end.py:99: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  ains = [item for item in ains if item is not 'tmp.wav']
Loaded the voice encoder model on cuda in 0.01 seconds.
Processing audio file M6_04_16k.wav
0 out of 0 are in this portion
Traceback (most recent call last):
  File "D:\code\MakeItTalk\main_end2end.py", line 113, in <module>
    au_data_i = c.convert_single_wav_to_autovc_input(audio_filename=os.path.join('examples', ain),
  File "D:\code\MakeItTalk\src\autovc\AutoVC_mel_Convertor_retrain_version.py", line 225, in convert_single_wav_to_autovc_input
    x_real_src, f0_norm = extract_f0_func_audiofile(audio_file, 'F')
  File "D:\code\MakeItTalk\src\autovc\retrain_version\vocoder_spec\extract_f0_func.py", line 97, in extract_f0_func_audiofile
    mel_basis = mel(16000, 1024, fmin=90, fmax=7600, n_mels=80).T
TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given

A error resulted in MakeItTalk\src\autovc\retrain_version\vocoder_spec\extract_f0_func.py module librosa.filters.mel. Solved by changing line 97

mel_basis = mel(16000, 1024, fmin=90, fmax=7600, n_mels=80).T

to

mel_basis = mel(sr=16000, n_fft=1024, fmin=90, fmax=7600, n_mels=80).T

Wish that will take efforts

@RamitPahwa
Copy link

@BanananaFish I am still facing same error, can you point to what were your changes, the two statements looks same to me

@BanananaFish
Copy link
Author

@BanananaFish I am still facing same error, can you point to what were your changes, the two statements looks same to me

line 97
the point is to change position args to keyword args

@iboyles
Copy link

iboyles commented Jul 26, 2023

pip install librosa==0.8.0 or !pip install librosa==0.8.0 on colab fixed it for me when adding keyword to args didn't

@iboyles
Copy link

iboyles commented Jul 26, 2023

https://github.com/iboyles/makeittalknow.git you can use my repo also I made changes to old code to work in present day

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

3 participants