From f082a8242031dbaf16ed392d875a73897d58f87a Mon Sep 17 00:00:00 2001 From: "Moose W. Oler" Date: Mon, 11 Apr 2022 17:26:52 +0800 Subject: [PATCH] fix issue #496 (#498) pass `wav`, `sampling_rate` (in encoder/audio.py line 59 ) as keyword args instead of postional args to prevent warning messages from massing up console outputs while adopting librosa 0.9.1 occasionally. --- encoder/audio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/encoder/audio.py b/encoder/audio.py index 799aa83..5c087ee 100644 --- a/encoder/audio.py +++ b/encoder/audio.py @@ -56,8 +56,8 @@ def wav_to_mel_spectrogram(wav): Note: this not a log-mel spectrogram. """ frames = librosa.feature.melspectrogram( - wav, - sampling_rate, + y=wav, + sr=sampling_rate, n_fft=int(sampling_rate * mel_window_length / 1000), hop_length=int(sampling_rate * mel_window_step / 1000), n_mels=mel_n_channels