torch-audiomentations
torch-audiomentations copied to clipboard
Pitch shifting and time stretching in a single transform
A transform that does both in one go, so it's faster (and probably sounds better) than doing pitch shifting and time stretching separately.
What is the difference wrt just resampling ? It should be pretty much the same no ?
When I resample, I can get two outcomes:
- The pitch goes up and the tempo goes up
- The pitch goes down and the tempo goes down
Here's a rough illustration with a pink line that shows all the tempo + pitch combinations that we can get by resampling:
On the other hand, doing pitch shifting and time stretching allows one to get any combination of tempo and pitch (here illustrated by the blue rectangle). For example, I can pitch down the audio while speeding up the tempo slightly
Is time stretching available in torch-audiomentations? I see only PitchShift augmentation which does not change the tempo
No, not at the moment. I recommend using the TimeStretch in audiomentations for the time being.
There is an experimental time stretch PR in torch-audiomentations, but it is nowhere near complete - it requires some changes in the "backbone" of torch-audiomentations