diff --git a/torch_stft/stft.py b/torch_stft/stft.py index af2ab9e..ecb3738 100644 --- a/torch_stft/stft.py +++ b/torch_stft/stft.py @@ -43,7 +43,7 @@ def __init__(self, filter_length=1024, hop_length=512, win_length=None, assert(filter_length >= self.win_length) # get window and zero center pad it to filter_length fft_window = get_window(window, self.win_length, fftbins=True) - fft_window = pad_center(fft_window, filter_length) + fft_window = pad_center(fft_window, size=filter_length) fft_window = torch.from_numpy(fft_window).float() # window the bases diff --git a/torch_stft/util.py b/torch_stft/util.py index e1a9229..4c08bb7 100644 --- a/torch_stft/util.py +++ b/torch_stft/util.py @@ -37,7 +37,7 @@ def window_sumsquare(window, n_frames, hop_length=200, win_length=800, # Compute the squared window at the desired length win_sq = get_window(window, win_length, fftbins=True) win_sq = librosa_util.normalize(win_sq, norm=norm)**2 - win_sq = librosa_util.pad_center(win_sq, n_fft) + win_sq = librosa_util.pad_center(win_sq, size=n_fft) # Fill the envelope for i in range(n_frames):