fffiloni commited on
Commit
1f24fdc
·
verified ·
1 Parent(s): 3bebdb5

Update audioldm/audio/stft.py

Browse files
Files changed (1) hide show
  1. audioldm/audio/stft.py +6 -2
audioldm/audio/stft.py CHANGED
@@ -148,8 +148,12 @@ class TacotronSTFT(torch.nn.Module):
148
  self.n_mel_channels = n_mel_channels
149
  self.sampling_rate = sampling_rate
150
  self.stft_fn = STFT(filter_length, hop_length, win_length)
151
- mel_basis = librosa_mel_fn(
152
- sampling_rate, filter_length, n_mel_channels, mel_fmin, mel_fmax
 
 
 
 
153
  )
154
  mel_basis = torch.from_numpy(mel_basis).float()
155
  self.register_buffer("mel_basis", mel_basis)
 
148
  self.n_mel_channels = n_mel_channels
149
  self.sampling_rate = sampling_rate
150
  self.stft_fn = STFT(filter_length, hop_length, win_length)
151
+ mel_basis = librosa_filters.mel(
152
+ sr=sampling_rate,
153
+ n_fft=filter_length,
154
+ n_mels=n_mel_channels,
155
+ fmin=mel_fmin,
156
+ fmax=mel_fmax
157
  )
158
  mel_basis = torch.from_numpy(mel_basis).float()
159
  self.register_buffer("mel_basis", mel_basis)