Spaces:
Running
Running
update
Browse files
toolbox/torchaudio/models/clean_unet/loss.py
CHANGED
@@ -16,7 +16,7 @@ def stft(x, fft_size, hop_size, win_length, window):
|
|
16 |
:return: Magnitude spectrogram (B, #frames, fft_size // 2 + 1).
|
17 |
"""
|
18 |
|
19 |
-
x_stft = torch.stft(x, fft_size, hop_size, win_length, window)
|
20 |
|
21 |
return x_stft.abs()
|
22 |
|
|
|
16 |
:return: Magnitude spectrogram (B, #frames, fft_size // 2 + 1).
|
17 |
"""
|
18 |
|
19 |
+
x_stft = torch.stft(x, fft_size, hop_size, win_length, window, return_complex=True)
|
20 |
|
21 |
return x_stft.abs()
|
22 |
|