Skip to content

Commit 2691493

Browse files
committed
hard-coded 'win_size' fixed.
1 parent 1198d8c commit 2691493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

meldataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def mel_spectrogram(y, n_fft, num_mels, sampling_rate, hop_size, win_size, fmin,
5656
if fmax not in mel_basis:
5757
mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax)
5858
mel_basis[str(fmax)+'_'+str(y.device)] = torch.from_numpy(mel).float().to(y.device)
59-
hann_window[str(y.device)] = torch.hann_window(1024).to(y.device)
59+
hann_window[str(y.device)] = torch.hann_window(win_size).to(y.device)
6060

6161
y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect')
6262
y = y.squeeze(1)

0 commit comments

Comments
 (0)