We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0bacd1 commit bc62f43Copy full SHA for bc62f43
training/nsf_HiFigan_task.py
@@ -86,7 +86,7 @@ def __getitem__(self, index):
86
crop_mel_frames = int(np.ceil((self.config['crop_mel_frames'] + 4) * speed))
87
samples_per_frame = self.config['hop_size']
88
crop_wav_samples = crop_mel_frames * samples_per_frame
89
- if crop_wav_samples < audio.shape[0]:
+ if crop_wav_samples >= audio.shape[0]:
90
return {'f0': data['f0'], 'spectrogram': data['mel'], 'audio': data['audio']}
91
start = random.randint(0, audio.shape[0] - 1 - crop_wav_samples)
92
end = start + crop_wav_samples
0 commit comments