Skip to content

Commit 8c54218

Browse files
committed
fix bug
1 parent 325b7c6 commit 8c54218

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

training/nsf_HiFigan_task.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def __getitem__(self, index):
9696
f0, uv = get_pitch(audio.numpy(), hparams=self.config, speed=speed, interp_uv=True, length=mel_aug.shape[-1])
9797
if f0 is None:
9898
return {'f0': data['f0'], 'spectrogram': data['mel'], 'audio': data['audio']}
99+
audio_aug = audio_aug[2*samples_per_frame: -2*samples_per_frame].numpy()
100+
mel_aug = mel_aug[0, :, 2:-2].T.numpy()
99101
f0_aug = f0[2:-2] * speed
100102
return {'f0': f0_aug, 'spectrogram': mel_aug, 'audio': audio_aug}
101103

0 commit comments

Comments
 (0)