⚗️ | Small fixes here and there

This commit is contained in:
2025-12-11 23:06:38 +02:00
parent e3e555794e
commit 571c403b93
4 changed files with 12 additions and 13 deletions

View File

@@ -67,5 +67,6 @@ class AudioDataset(Dataset):
if audio_clip[0].shape[1] < low_audio_clip.shape[1]:
low_audio_clip = low_audio_clip[:, :audio_clip[0].shape[1]]
elif audio_clip[0].shape[1] > low_audio_clip.shape[1]:
low_audio_clip = AudioUtils.pad_tensor(low_audio_clip, self.clip_length)
target_len = audio_clip[0].shape[1]
low_audio_clip = AudioUtils.pad_tensor(low_audio_clip, target_len)
return ((audio_clip[0], low_audio_clip), (audio_clip[1], mangled_sample_rate))