Skip to main content

Augments audio for machine learning

Project description

AudAugio (pronounced like “adagio”) is a Python library for augmenting audio for machine learning. It includes a built-in set of common augmentations as well as the ability to easily define new ones, as well as a framework for applying and layering those augmentations.


Install AudAugio with pip:

pip install audaugio

If you want to use one of the built-in augmentations that relies on SoX, you’ll need to install it separately. You can do that at the SoX SourceForge page. Augmentations that rely on SoX note that in their documentation, and are listed here:

  • Equalizer Augmentation

  • Low Pass Augmentation

  • High Pass Augmentation


Below is an example of how to use AudAugio to augment an audio file:

import librosa

import audaugio

y, sr = librosa.load('sample.wav')

chain = audaugio.CombinatoricChain(audaugio.PitchShiftAugmentation(1),
                                   audaugio.EqualizerAugmentation(800, .15, -15))

augmented_audio = chain(y, sr)

for i, a in enumerate(augmented_audio):
    librosa.output.write_wav("output/{0}.wav".format(i), a, sr)

For more, read the documentation for AudAugio.

Augmentation Chains

Augmentations are applied through augmentation chains. There are two kinds of chains - combinatoric chains and linear chains. Combinatorically applying the augmentations creates a modified and unmodified version of the signal for each augmentation, which are then each augmented further by the remaining augmentations in the chain. For example, if a single signal is combinatorically augmented with both a pitch shift augmentation and a background noise augmentation, there will be four resulting augmented signals:

  • The dry signal

  • The pitch shifted signal

  • The signal with background noise added

  • The pitch shifted signal with background noise added

Linear chains do not retain the unmodified signal after processing. If same chain as above was applied, the only signal returned would be the pitch shifted signal with background noise added.


Contact Brian Margolis (brianmargolis [at] with any questions or issues. Please look at the “issues” page before reporting problems.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AudAugio-0.0.2a0.tar.gz (7.6 kB view hashes)

Uploaded source

Built Distribution

AudAugio-0.0.2a0-py3-none-any.whl (11.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page