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.3.0.tar.gz
(2.7 kB
view details)
Built Distribution
File details
Details for the file audiomentations-0.3.0.tar.gz
.
File metadata
- Download URL: audiomentations-0.3.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 075f2b951429c2f84bdc67c54a4e168efaa21fb82274ded5cd4432f71f25b9cc |
|
MD5 | a02f61711032b62b69db22bf70054cc2 |
|
BLAKE2b-256 | 48a2ee9a0cdae437a67e1d3510528d303e13a16251aedb32722e254d8ac844ef |
File details
Details for the file audiomentations-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: audiomentations-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 912462fc053b303a68460de5995eab2f2e24dde76f55ae298564dad8190a2a0f |
|
MD5 | f509d35832944a01cecea552934a7db6 |
|
BLAKE2b-256 | 4b5fcafeeac825a7fa38098906baae6048f83a4771059e949209d1fb9f3cbb92 |