A library for audio data augmentation. Inspired by albumentations.
Project description
Audiomentations
A python library for doing audio data augmentation
Setup
pip install audiomentations
Usage example
from audiomentations import Compose, AddGaussianNoise, TimeStretch
import numpy as np
SAMPLE_RATE = 16000
augmenter = 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),
])
samples = np.zeros((20,), dtype=np.float32)
samples = augmenter(samples=samples, sample_rate=SAMPLE_RATE)
Development
Code style
Format the code with black
Run tests
nosetests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
audiomentations-0.4.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for audiomentations-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a51f824ae63f5c84445bdc76080cf506a43eb32f4a5be3e2905312a12026efc3 |
|
MD5 | 68f3df44a3091b79f609510f28308d2b |
|
BLAKE2b-256 | 81362e628d2462253b9629f31e6f997e652dd88216567a58c0007a4d5e1a64b7 |