From e0e3b12b2645b98f8b687f2c7db869e5b5bf43ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Tue, 6 Apr 2021 11:00:02 +0200 Subject: [PATCH] pass all parameters explicity to _istft --- TTS/utils/audio.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/TTS/utils/audio.py b/TTS/utils/audio.py index 618bc338..c674dd99 100644 --- a/TTS/utils/audio.py +++ b/TTS/utils/audio.py @@ -306,17 +306,22 @@ class AudioProcessor(object): ### STFT and ISTFT ### def _stft(self, y): - return librosa.stft( - y=y, - n_fft=self.fft_size, - hop_length=self.hop_length, - win_length=self.win_length, - pad_mode=self.stft_pad_mode, - ) + return librosa.stft(y=y, + n_fft=self.fft_size, + hop_length=self.hop_length, + win_length=self.win_length, + pad_mode=self.stft_pad_mode, + window='hann', + center=True, + dtype=None) def _istft(self, y): - return librosa.istft( - y, hop_length=self.hop_length, win_length=self.win_length) + return librosa.istft(y, + hop_length=self.hop_length, + win_length=self.win_length, + window='hann', + center=True, + dtype=None) def _griffin_lim(self, S): angles = np.exp(2j * np.pi * np.random.rand(*S.shape))