Skip to main content

A library for audio data augmentation. Inspired by albumentations.

Project description

Audiomentations

Build status

A python library for doing audio data augmentation

Setup

PyPI version Number of downloads from PyPI per month

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


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 details)

Uploaded Source

Built Distribution

audiomentations-0.4.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file audiomentations-0.4.0.tar.gz.

File metadata

  • Download URL: audiomentations-0.4.0.tar.gz
  • Upload date:
  • Size: 2.8 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

Hashes for audiomentations-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ca32acc26e49226313166bd86abce68869480af4a3a0f7fb08b55a62cdd76d7f
MD5 bc131228287a80cb712b309ca54b234e
BLAKE2b-256 23554dfb074c1883bf862202ad7a70ee3d7d1b28c5de677d064d8c812dccde0d

See more details on using hashes here.

File details

Details for the file audiomentations-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: audiomentations-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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

Hashes for audiomentations-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51f824ae63f5c84445bdc76080cf506a43eb32f4a5be3e2905312a12026efc3
MD5 68f3df44a3091b79f609510f28308d2b
BLAKE2b-256 81362e628d2462253b9629f31e6f997e652dd88216567a58c0007a4d5e1a64b7

See more details on using hashes here.

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