asteroid-team / torch-audiomentations

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

Add support for spectrogram transforms #4

Open iver56 opened 4 years ago

iver56 commented 4 years ago

E.g. transforms like this: https://github.com/zcaceres/spec_augment

mpariente commented 4 years ago

Related question: we should probably include STFT in the deterministic transforms. Should we support torchaudio's and asteroid's?

iver56 commented 4 years ago

Sounds good to me

hbredin commented 4 years ago

Thinking out loud: would it make sense to make no API distinction between feature extraction and augmentation? Spectrogram extraction could be seen as an augmentation of audio.

It would allow an API like that:

augmenter = Chain(AddBackgroundNoise(), Spectrogram(), SpecAugment())
augmented_spectrogram = augmenter(audio)
mpariente commented 4 years ago

That's what I have in mind at least. Everything is a transform, and augmentations are just probabilistic ones.

mpariente commented 4 years ago

Sounds good to me

Cool. So I'll think about outsourcing asteroid's filterbank API to another repo then.