Rudrabha / Wav2Lip

This repository contains the codes of "A Lip Sync Expert Is All You Need for Speech to Lip Generation In the Wild", published at ACM Multimedia 2020. For HD commercial model, please try out Sync Labs
https://synclabs.so
10.8k stars 2.29k forks source link

Version incompatibility in librosa results in an arity error when calling librosa.filters.mel() #627

Open usergenic opened 9 months ago

usergenic commented 9 months ago

Ran for the first time on Colab tonight and got this error running the cell with inference.py

Traceback (most recent call last):
  File "/content/Wav2Lip/inference.py", line 280, in <module>
    main()
  File "/content/Wav2Lip/inference.py", line 225, in main
    mel = audio.melspectrogram(wav)
  File "/content/Wav2Lip/audio.py", line 47, in melspectrogram
    S = _amp_to_db(_linear_to_mel(np.abs(D))) - hp.ref_level_db
  File "/content/Wav2Lip/audio.py", line 95, in _linear_to_mel
    _mel_basis = _build_mel_basis()
  File "/content/Wav2Lip/audio.py", line 100, in _build_mel_basis
    return librosa.filters.mel(hp.sample_rate, hp.n_fft, n_mels=hp.num_mels,
TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given
black-device commented 9 months ago

did you manage to get it working?

dwanggit commented 9 months ago

+1, librosa version issue

black-device commented 9 months ago

I have only been able to make it work by downloading my virtual machine to Ubuntu 18.04, from there the versions of the repositories adapt to the project... I hope it helps.

tmc commented 8 months ago

librosa changed mel to force all arguments to be named (but supplying * as the first/only positional arg). You can see what's needed about changing that call in https://github.com/tmc/Wav2Lip/commit/00646c4745f364873d3a1aa3c142820a91ca4b65