saifhassan / Wav2Lip-HD

High-Fidelity Lip-Syncing with Wav2Lip and Real-ESRGAN
Other
320 stars 75 forks source link

TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given #28

Closed AIhasArrived closed 8 months ago

AIhasArrived commented 8 months ago

I used this line:

python inference.py --checkpoint_path "checkpoints\wav2lip_gan.pth" --segmentation_path "checkpoints\face_segmentation.pth" --sr_path "checkpoints\esrgan_yunying.pth" --face 1.mp4 --audio 1.wav --save_frames --gt_path "data\gt" --pred_path "data\lq" --no_sr --no_segmentation --outfile letsgo.mp4

I had my inputs in the same directory that's okay. Howeverd I dont get the errors, what's happening?

Traceback (most recent call last): File "C:\Users\DDD\Desktop\LipSyncAll\Newfolder2\Wav2Lip-HD\inference.py", line 359, in main() File "C:\Users\DDI\Desktop\LipSyncAll\Newfolder2\Wav2Lip-HD\inference.py", line 263, in main mel = audio.melspectrogram(wav) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DDD\Desktop\LipSyncAll\Newfolder2\Wav2Lip-HD\audio.py", line 47, in melspectrogram S = _amp_to_db(_linear_to_mel(np.abs(D))) - hp.ref_level_db ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DDD\Desktop\LipSyncAll\Newfolder2\Wav2Lip-HD\audio.py", line 95, in _linear_to_mel _mel_basis = _build_mel_basis() ^^^^^^^^^^^^^^^^^^ File "C:\Users\DDD\Desktop\LipSyncAll\Newfolder2\Wav2Lip-HD\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

AIhasArrived commented 8 months ago

Found solution here: https://stackoverflow.com/questions/75796284/typeerror-mel-takes-0-positional-arguments-but-5-were-given