• Stars
    star
    1,788
  • Rank 26,002 (Top 0.6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Python library for audio data augmentation. Inspired by albumentations. Useful for machine learning.

Audiomentations

Build status Code coverage Code Style: Black Licence: MIT DOI

A Python library for audio data augmentation. Inspired by albumentations. Useful for deep learning. Runs on CPU. Supports mono audio and multichannel audio. Can be integrated in training pipelines in e.g. Tensorflow/Keras or Pytorch. Has helped people get world-class results in Kaggle competitions. Is used by companies making next-generation audio products.

Need a Pytorch-specific alternative with GPU support? Check out torch-audiomentations!

Setup

Python version support PyPI version Number of downloads from PyPI per month

pip install audiomentations

Usage example

from audiomentations import Compose, AddGaussianNoise, TimeStretch, PitchShift, Shift
import numpy as np

augment = Compose([
    AddGaussianNoise(min_amplitude=0.001, max_amplitude=0.015, p=0.5),
    TimeStretch(min_rate=0.8, max_rate=1.25, p=0.5),
    PitchShift(min_semitones=-4, max_semitones=4, p=0.5),
    Shift(min_fraction=-0.5, max_fraction=0.5, p=0.5),
])

# Generate 2 seconds of dummy audio for the sake of example
samples = np.random.uniform(low=-0.2, high=0.2, size=(32000,)).astype(np.float32)

# Augment/transform/perturb the audio data
augmented_samples = augment(samples=samples, sample_rate=16000)

Documentation

See https://iver56.github.io/audiomentations/

Transforms

Changelog

See https://iver56.github.io/audiomentations/changelog/

Acknowledgements

Thanks to Nomono for backing audiomentations.

Thanks to all contributors who help improving audiomentations.

More Repositories

1

cross-adaptive-audio

Evolving Artificial Neural Networks for Cross-Adaptive Audio Effects
Python
95
star
2

emoji-art-generator

Use a genetic algorithm to evolve an image by putting emojies on a canvas
Python
78
star
3

image-regression

A DNN that takes in x, y and outputs colors at that point to approximately "paint" an image. A toy problem.
Python
47
star
4

clap-detection

Simple clap rhythm detection on Raspberry Pi using Csound and Python. Toy example.
Python
32
star
5

automatic-video-colorization

Automatic temporally coherent video colorization designed to work well on animated cartoons and demos
Python
29
star
6

python-i18n-basics

Example of a basic python i18n setup with Gettext, Babel and Jinja2
Python
17
star
7

neon-fantasy

A synthwave-style demo that ranked 1st in ARM DemoCompo in Trondheim, 2018. Designed to be run in Chrome on a Samsung Galaxy S9
JavaScript
16
star
8

tcn-example

A toy example that compares TCN with BiLSTM
Python
7
star
9

live-audio-ml

A system that should classify audio in real-time
Python
6
star
10

image-ranker

A proof of concept of a machine learning model that compares two images
Python
3
star
11

indoor-nav

Toy project: Simulate beacon signal strengths and use them to estimate where the receiver is
JavaScript
3
star
12

auto-light

Home automation: Light that turns on when somebody is standing still in front of the mirror
Python
3
star
13

lstm-name-classifier

A toy LSTM model that classifies gender based on first name. Presented at Trondheim Machine Learning Meetup in February 2018.
Python
3
star
14

it3708

Sub-symbolic AI methods: Genetic Algorithms, Neural Networks and Emergent Behavior
JavaScript
2
star
15

homey-ismartgate

Homey app for ismartgate integration
JavaScript
2
star
16

pi-webcam

Raspberry pi webcam script. Made to work with https://github.com/iver56/img-store as backend.
Python
2
star
17

pong-autoencoder

Autoencoder toy problem: Convert 32x32 bitmap of a pong state to a 12-dimensional vector (that describes ball and paddle positions).
Python
2
star
18

interactive-softmax

Interactive softmax
HTML
2
star
19

toy-object-detector

Generate dataset with simple geometrical shapes, then train a RetinaNet on it and evaluate the result
Python
2
star
20

demo-style

A project where I play around with video/demo stylization/colorization
Python
1
star
21

cython-region-growing

A quick experiment: Region growing (AKA flood fill) algorithm implemented in Cython and Python
Python
1
star
22

angelika-web

Responsive single-page application for the customer driven project Angelika (health tracking)
JavaScript
1
star
23

css3-animasjoner-kurs

Slides til et kort, hands-on kurs i animasjoner/overganger i CSS3
HTML
1
star
24

aunino

Analyze a set of audio files and write the result to a js file
Python
1
star
25

cnn-clock

A convolutional neural network that can tell the time by looking at an image of an analog clock. A toy problem.
Python
1
star