iver56 / audiomentations

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

Implement RepeatPart transform #293

Closed iver56 closed 10 months ago

iver56 commented 11 months ago

Take a part of the audio and repeat it a number of times (need param for min & max repeats)

Need params for min/max duration of the repeated part

Could have several modes: insert, replace

Could support optional crossfading (like 5 ms? maybe a parameter for this) for avoiding impulses

Could also support a part_transform parameter that lets it apply different transforms to the different repeated parts

Should it support repeating more than one part of the audio? Not sure about this. Probably easiest to just support one.