mirror of https://github.com/coqui-ai/TTS.git
pass all parameters explicity to _istft
This commit is contained in:
parent
f0e76ee135
commit
e0e3b12b26
|
@ -306,17 +306,22 @@ class AudioProcessor(object):
|
||||||
|
|
||||||
### STFT and ISTFT ###
|
### STFT and ISTFT ###
|
||||||
def _stft(self, y):
|
def _stft(self, y):
|
||||||
return librosa.stft(
|
return librosa.stft(y=y,
|
||||||
y=y,
|
n_fft=self.fft_size,
|
||||||
n_fft=self.fft_size,
|
hop_length=self.hop_length,
|
||||||
hop_length=self.hop_length,
|
win_length=self.win_length,
|
||||||
win_length=self.win_length,
|
pad_mode=self.stft_pad_mode,
|
||||||
pad_mode=self.stft_pad_mode,
|
window='hann',
|
||||||
)
|
center=True,
|
||||||
|
dtype=None)
|
||||||
|
|
||||||
def _istft(self, y):
|
def _istft(self, y):
|
||||||
return librosa.istft(
|
return librosa.istft(y,
|
||||||
y, hop_length=self.hop_length, win_length=self.win_length)
|
hop_length=self.hop_length,
|
||||||
|
win_length=self.win_length,
|
||||||
|
window='hann',
|
||||||
|
center=True,
|
||||||
|
dtype=None)
|
||||||
|
|
||||||
def _griffin_lim(self, S):
|
def _griffin_lim(self, S):
|
||||||
angles = np.exp(2j * np.pi * np.random.rand(*S.shape))
|
angles = np.exp(2j * np.pi * np.random.rand(*S.shape))
|
||||||
|
|
Loading…
Reference in New Issue