mirror of https://github.com/coqui-ai/TTS.git
Remove min max mel freq
parent
070156b631
commit
56c6d0cac8
4
train.py
4
train.py
|
@ -347,9 +347,7 @@ def main(args):
|
|||
ref_level_db=c.ref_level_db,
|
||||
num_freq=c.num_freq,
|
||||
power=c.power,
|
||||
preemphasis=c.preemphasis,
|
||||
min_mel_freq=c.min_mel_freq,
|
||||
max_mel_freq=c.max_mel_freq)
|
||||
preemphasis=c.preemphasis)
|
||||
|
||||
# Setup the dataset
|
||||
train_dataset = Dataset(
|
||||
|
|
|
@ -19,8 +19,6 @@ class AudioProcessor(object):
|
|||
num_freq,
|
||||
power,
|
||||
preemphasis,
|
||||
min_mel_freq,
|
||||
max_mel_freq,
|
||||
griffin_lim_iters=None):
|
||||
|
||||
print(" > Setting up Audio Processor...")
|
||||
|
@ -33,8 +31,6 @@ class AudioProcessor(object):
|
|||
self.num_freq = num_freq
|
||||
self.power = power
|
||||
self.preemphasis = preemphasis
|
||||
self.min_mel_freq = min_mel_freq
|
||||
self.max_mel_freq = max_mel_freq
|
||||
self.griffin_lim_iters = griffin_lim_iters
|
||||
self.n_fft, self.hop_length, self.win_length = self._stft_parameters()
|
||||
if preemphasis == 0:
|
||||
|
@ -54,7 +50,6 @@ class AudioProcessor(object):
|
|||
n_fft = (self.num_freq - 1) * 2
|
||||
return librosa.filters.mel(
|
||||
self.sample_rate, n_fft, n_mels=self.num_mels)
|
||||
# fmin=self.min_mel_freq, fmax=self.max_mel_freq)
|
||||
|
||||
def _normalize(self, S):
|
||||
return np.clip((S - self.min_level_db) / -self.min_level_db, 0, 1)
|
||||
|
@ -105,19 +100,6 @@ class AudioProcessor(object):
|
|||
else:
|
||||
return self._griffin_lim(S**self.power)
|
||||
|
||||
# def _griffin_lim(self, S):
|
||||
# '''Applies Griffin-Lim's raw.
|
||||
# '''
|
||||
# S_best = copy.deepcopy(S)
|
||||
# for i in range(self.griffin_lim_iters):
|
||||
# S_t = self._istft(S_best)
|
||||
# est = self._stft(S_t)
|
||||
# phase = est / np.maximum(1e-8, np.abs(est))
|
||||
# S_best = S * phase
|
||||
# S_t = self._istft(S_best)
|
||||
# y = np.real(S_t)
|
||||
# return y
|
||||
|
||||
def _griffin_lim(self, S):
|
||||
angles = np.exp(2j * np.pi * np.random.rand(*S.shape))
|
||||
S_complex = np.abs(S).astype(np.complex)
|
||||
|
|
Loading…
Reference in New Issue