Skip to content

Commit bc62f43

Browse files
committed
fix bug
1 parent a0bacd1 commit bc62f43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

training/nsf_HiFigan_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __getitem__(self, index):
8686
crop_mel_frames = int(np.ceil((self.config['crop_mel_frames'] + 4) * speed))
8787
samples_per_frame = self.config['hop_size']
8888
crop_wav_samples = crop_mel_frames * samples_per_frame
89-
if crop_wav_samples < audio.shape[0]:
89+
if crop_wav_samples >= audio.shape[0]:
9090
return {'f0': data['f0'], 'spectrogram': data['mel'], 'audio': data['audio']}
9191
start = random.randint(0, audio.shape[0] - 1 - crop_wav_samples)
9292
end = start + crop_wav_samples

0 commit comments

Comments
 (0)