Use slaney norm in the mel filterbank computation

This commit is contained in:
James Betker 2021-12-10 20:04:52 -07:00
parent b2d8fbcfc0
commit faf55684b8

View File

@ -607,7 +607,8 @@ class TorchMelSpectrogramInjector(Injector):
self.mel_stft = torchaudio.transforms.MelSpectrogram(n_fft=self.filter_length, hop_length=self.hop_length, 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, win_length=self.win_length, power=2, normalized=norm,
sample_rate=self.sampling_rate, f_min=self.mel_fmin, 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): def forward(self, state):
inp = state[self.input] inp = state[self.input]