TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given
Author: Dhruv3soodCreated Oct 12, 2025Updated Aug 6, 2026
In recent librosa (0.10+), librosa.filters.mel made its parameters keyword-only. Wav2Lip’s audio.py still calls it with positional args:
passing keyword args:
# audio.py
def _build_mel_basis():
return librosa.filters.mel(
sr=hp.sample_rate,
n_fft=hp.n_fft,
n_mels=hp.num_mels,
fmin=hp.fmin,
fmax=hp.fmax,
)Source: Rudrabha/Wav2Lip