Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pitch shifting and time stretching in a single transform #101

Open
iver56 opened this issue Oct 11, 2021 · 4 comments
Open

Pitch shifting and time stretching in a single transform #101

iver56 opened this issue Oct 11, 2021 · 4 comments

Comments

@iver56
Copy link
Collaborator

iver56 commented Oct 11, 2021

A transform that does both in one go, so it's faster (and probably sounds better) than doing pitch shifting and time stretching separately.

@popcornell
Copy link

What is the difference wrt just resampling ? It should be pretty much the same no ?

@iver56
Copy link
Collaborator Author

iver56 commented Oct 18, 2021

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:

bilde

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

@WhiteTeaDragon
Copy link

Is time stretching available in torch-audiomentations? I see only PitchShift augmentation which does not change the tempo

@iver56
Copy link
Collaborator Author

iver56 commented Oct 17, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants