From faf55684b87b1eacba8c4f9739527cb541c45691 Mon Sep 17 00:00:00 2001 From: James Betker Date: Fri, 10 Dec 2021 20:04:52 -0700 Subject: [PATCH] Use slaney norm in the mel filterbank computation --- codes/trainer/injectors/base_injectors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codes/trainer/injectors/base_injectors.py b/codes/trainer/injectors/base_injectors.py index 10a4d08c..051cd7ea 100644 --- a/codes/trainer/injectors/base_injectors.py +++ b/codes/trainer/injectors/base_injectors.py @@ -607,7 +607,8 @@ class TorchMelSpectrogramInjector(Injector): self.mel_stft = torchaudio.transforms.MelSpectrogram(n_fft=self.filter_length, hop_length=self.hop_length, win_length=self.win_length, power=2, normalized=norm, sample_rate=self.sampling_rate, f_min=self.mel_fmin, - f_max=self.mel_fmax, n_mels=self.n_mel_channels) + f_max=self.mel_fmax, n_mels=self.n_mel_channels, + norm="slaney") def forward(self, state): inp = state[self.input]