From fb1d4b188278ff26e8b8adf44a552a9c135d55b6 Mon Sep 17 00:00:00 2001 From: tarepan Date: Mon, 24 Apr 2023 19:35:09 +0900 Subject: [PATCH] Fix deprecated positional arguments in mel (#133) --- train/mel_processing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/train/mel_processing.py b/train/mel_processing.py index 0c1867b..668ea86 100644 --- a/train/mel_processing.py +++ b/train/mel_processing.py @@ -98,7 +98,9 @@ def spec_to_mel_torch(spec, n_fft, num_mels, sampling_rate, fmin, fmax): dtype_device = str(spec.dtype) + "_" + str(spec.device) fmax_dtype_device = str(fmax) + "_" + dtype_device if fmax_dtype_device not in mel_basis: - mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax) + mel = librosa_mel_fn( + sr=sampling_rate, n_fft=n_fft, n_mels=num_mels, fmin=fmin, fmax=fmax + ) mel_basis[fmax_dtype_device] = torch.from_numpy(mel).to( dtype=spec.dtype, device=spec.device )