-
Notifications
You must be signed in to change notification settings - Fork 90
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
Is there any built-in data augmentation function? #49
Comments
Hi YongHyeok, thanks for you question. Unfortunately, there is no build in data augmentation in nnAudio at the moment. If you have the augmentation function, however, you can apply it to the PyTorch tensor returned by nnAudio. |
@KinWaiCheuk |
Yes, I do wish to expand nnAudio by adding more features to it (data augmentation is one of the items on my mind). But we are lack of manpower at the moment (me and my current collaborator are occupied with improving the GriffinLim reconstruction accuracy). If you know anyone who are interested in contributing, please let me know, it would be a great help for us! |
Regarding audio augmentation, you might want to join forces with https://github.com/asteroid-team/torch-audiomentations. |
Wow, it is a really awesome project! If it is the case, I think a build-in data augmentation is not necessary for nnAudio? Since you can always keep one line of code as audio-domain augmentation, another line of code for nnAudio, e.g. import torch
from torch_audiomentations import Gain
from nnAudio import Spectrogram
class MyModel():
def __init___(args):
self.augmentation_layer = Gain(min_gain_in_db=-15.0, max_gain_in_db=5.0, p=0.5)
self.nnaudio_layer = Spectrogram.STFT()
self.neuralnet = SomeNeuralNet()
def forward(x):
x = self.augmentation_layer(x)
x = self.nnaudio_layer(x)
x = self.neuralnet(x)
return x Is there any augmentation that cannot be done in this way? |
I am sure that someone will eventualy come up with a new augmentation technique that must be done in a different way but I don't know of any for now. |
There is also Kornia, I guess that could be used as long as they provide the necessary Augmentations: |
Hi, I'm so impressed by your wonderful project.
But, I want to know how can i augment the training data (ex. SNR control, time-stretch, speed perturbation, volume or pitch control, specaugment ...)
In the torchaudio, there are built-in parameter for the data transformations. https://pytorch.org/tutorials/beginner/audio_preprocessing_tutorial.html#transformations
Is there any built-in function or parameter for the data augmentation?
The text was updated successfully, but these errors were encountered: