-
Notifications
You must be signed in to change notification settings - Fork 739
Add some transforms #122
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
Add some transforms #122
Conversation
| return self.__class__.__name__ + '()' | ||
|
|
||
|
|
||
| class Pad(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class seems very similar to PadTrim (
audio/torchaudio/transforms.py
Line 75 in 7ee1d38
| class PadTrim(object): |
Is there any difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not look like. They bot end up using the same torch.functional.pad function.
|
Would be nice to merge those extra utility functions @marc-moreaux |
vincentqb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! There seems to be a significant overlap with existing transforms though, and it's not clear to me which of these transformations would be a non-trivial and useful addition.
| return crop_in_between(tensor, start.item(), end.item(), ch_dim) | ||
|
|
||
|
|
||
| def stretch(tensor, factor, interpolate, ch_dim): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this similar to Resample or phase_vocoder?
|
Since this PR is out of date and contains significant overlap with existing features, I will close this PR. Please feel free to open a new issue to discuss the transforms you would like to add within torchaudio so we can discuss how to proceed. |
In their paper https://arxiv.org/abs/1711.10282, the authors use 2D convolution of monoChannel raw audio sounds with some data augmentation like stretching the sound, randomly cropping a piece of sound and padding the sound on both extremities to allow random crops on the borders