Skip to content

Commit

Permalink
fix add colored noise to prevent issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
EamonnCarson committed Aug 29, 2024
1 parent a5c584d commit 9cb06d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_audiomentations/augmentations/colored_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _gen_noise(f_decay, num_samples, sample_rate, device):
)
spec *= mask
noise = Audio.rms_normalize(irfft(spec).unsqueeze(0)).squeeze()
noise = torch.cat([noise] * int(ceil(num_samples / sample_rate)))
noise = torch.cat([noise] * int(ceil(num_samples / noise.shape[0])))
return noise[:num_samples]


Expand Down

0 comments on commit 9cb06d4

Please sign in to comment.