asteroid-team / torch-audiomentations

Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning.
MIT License
969 stars 88 forks source link

feat: add support for batches in Audio.rms_normalize #125

Closed hbredin closed 2 years ago

hbredin commented 2 years ago

Audio.rms_normalize currently only works for (channel, time)-shaped samples.

This PR adds support for (batch_size, channel, time)-shaped samples as well, which is the usual shape of selected_samples in randomize_parameters and apply_transform.

iver56 commented 2 years ago

Thanks for this :) I would love a unit test. If you don't have one, I can probably make one in the coming days