diff --git a/pytorch/config.json b/pytorch/config.json index bfa57ee..201945a 100644 --- a/pytorch/config.json +++ b/pytorch/config.json @@ -16,7 +16,9 @@ "filter_length": 800, "hop_length": 200, "win_length": 800, - "sampling_rate": 16000 + "sampling_rate": 16000, + "mel_fmin": 0.0, + "mel_fmax": -1 }, "dist_config": { diff --git a/pytorch/mel2samp_onehot.py b/pytorch/mel2samp_onehot.py index 97e2258..fbe8eb5 100644 --- a/pytorch/mel2samp_onehot.py +++ b/pytorch/mel2samp_onehot.py @@ -47,16 +47,19 @@ class Mel2SampOnehot(torch.utils.data.Dataset): spectrogram, audio pair. """ def __init__(self, training_files, segment_length, mu_quantization, - filter_length, hop_length, win_length, sampling_rate): + filter_length, hop_length, win_length, sampling_rate, mel_fmin, mel_fmax): audio_files = utils.files_to_list(training_files) self.audio_files = audio_files random.seed(1234) random.shuffle(self.audio_files) + mel_fmax = None if mel_fmax == -1 else mel_fmax self.stft = TacotronSTFT(filter_length=filter_length, hop_length=hop_length, win_length=win_length, - sampling_rate=sampling_rate) + sampling_rate=sampling_rate, + mel_fmin=mel_fmin, + mel_fmax=mel_fmax) self.segment_length = segment_length self.mu_quantization = mu_quantization