iver56 / audiomentations

A Python library for audio data augmentation. Inspired by albumentations. Useful for machine learning.
https://iver56.github.io/audiomentations/
MIT License
1.83k stars 187 forks source link

RandomResample #210

Open ZFTurbo opened 2 years ago

ZFTurbo commented 2 years ago

First downsample then upsample back to original shape.

iver56 commented 2 years ago

What is the motivation for adding this transform? The effect would be pretty much the same as applying a low-pass filter, right?

ZFTurbo commented 2 years ago

I don't know if effect is the same. I was trying to emulate users behaviour during video/audio editing.

iver56 commented 2 years ago

I personally just apply a LPF to emulate such behavior. Doing a downsampling (including the usual LPF that is involved in that process) and then an upsampling requires more compute, but gives a similar result

ZFTurbo commented 2 years ago

May be we can add it in repo but add your comment that it's possible to replace with LPF? It's for the persons who will seek for the same augmentation. I don't see a problem to have it in repo.