Skip to content

Instantly share code, notes, and snippets.

@f-rumblefish
Last active April 5, 2020 02:02
Show Gist options
  • Save f-rumblefish/f726cbab2cca5ef55a8fb14294dde196 to your computer and use it in GitHub Desktop.
Save f-rumblefish/f726cbab2cca5ef55a8fb14294dde196 to your computer and use it in GitHub Desktop.
Audio Augmentation
# import library
import nlpaug
import nlpaug.augmenter.audio as naa
# loudness augmenter (where file_data is the output of librosa.load)
aug = naa.LoudnessAug(factor=(2, 5))
augmented_data = aug.augment(file_data)
# MFCC feature extraction for the new data ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment