Skip to main content

AUDIOMATE

PyPI Build Status Documentation Status DeepSource

Audiomate is a library for easy access to audio datasets. It provides the datastructures for accessing/loading different datasets in a generic way. This should ease the use of audio datasets for example for machine learning tasks.

import audiomate
from audiomate.corpus import io

# Download a dataset
esc_downloader = io.ESC50Downloader()
esc_downloader.download('/local/path')

# Load and work with the dataset
esc50 = audiomate.Corpus.load('/local/path', reader='esc-50')

# e.g. Read the audio signal and the label of specific sample/utterance
utterance = esc50.utterances['1-100032-A-0']
samples = utterance.read_samples()
label_list = utterance.label_lists[audiomate.corpus.LL_SOUND_CLASS]

for label in label_list:
  print(label.start, label.value)

Furthermore it provides tools for interacting with datasets (validation, splitting, subsets, merge, filter), extracting features, feeding samples for training ML models and more.

Currently supported datasets:

Currently supported formats:

Installation

pip install audiomate

Install the latest development version:

pip install git+https://github.com/ynop/audiomate.git

Dependencies

sox

For parts of the functionality (e.g. audio format conversion) sox is used. In order to use it, you have to install sox.

# macos
brew install sox

# with support for specific formats
brew install sox --with-lame --with-flac --with-libvorbis

# linux
apt-get install sox

# anaconda for macOS/windows/linux:
conda install -c conda-forge sox

Development

Prerequisites

It's recommended to use a virtual environment when developing audiomate. To create one, execute the following command in the project's root directory:

python -m venv .

To install audiomate and all it's dependencies, execute:

pip install -e .

Running the test suite

pip install -e .[dev]
pytest

With PyCharm you might have to change the default test runner. Otherwise, it might only suggest to use nose. To do so, go to File > Settings > Tools > Python Integrated Tools (on the Mac it's PyCharm > Preferences > Settings > Tools > Python Integrated Tools) and change the test runner to py.test.

Benchmarks

In order to check the runtime of specific parts, pytest-benchmark is used. Benchmarks are normal test functions, but call the benchmark fixture for the code under test.

To run benchmarks:

# Run all
pytest bench

# Specific benchmark
pytest bench/corpus/test_merge_corpus.py

To compare between different runs:

pytest-benchmark compare

Editing the Documentation

The documentation is written in reStructuredText and transformed into various output formats with the help of Sphinx.

To generate the documentation, execute:

pip install -e .[dev]
cd docs
make html

The generated files are written to docs/_build/html.

Versions

Versions is handled using bump2version. To bump the version:

bump2version [major,minor,patch,release,num]

In order to directly go to a final relase version (skip .dev/.rc/...):

bump2version [major,minor,patch] --new-version x.x.x

Release

Commands to create a new release on pypi.

rm -rf build
rm -rf dist

python setup.py sdist
python setup.py bdist_wheel
twine upload dist/*

Download files

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

Source Distribution

audiomate-6.0.0.tar.gz (180.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audiomate-6.0.0-py3-none-any.whl (259.2 kB view details)

Uploaded Python 3

File details

Details for the file audiomate-6.0.0.tar.gz.

File metadata

  • Download URL: audiomate-6.0.0.tar.gz
  • Upload date:
  • Size: 180.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.7

File hashes

Hashes for audiomate-6.0.0.tar.gz
Algorithm Hash digest
SHA256 784eb4e47d5b7e6ade7100adcd06869ef76cbf3843e4a34af733fcb0ad716cff
MD5 da280b6b586f21634314a66a4733c97a
BLAKE2b-256 f34ddce6aad619455d72e955e850e86888b6fd62fb34984f6be018185d0489e4

See more details on using hashes here.

File details

Details for the file audiomate-6.0.0-py3-none-any.whl.

File metadata

  • Download URL: audiomate-6.0.0-py3-none-any.whl
  • Upload date:
  • Size: 259.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.7

File hashes

Hashes for audiomate-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9745c614367cdf83963cc3bd4c66357a32aeae2846edf93f3dcd22e31151cfdf
MD5 50d5ea8579c59e678b70eb1318549425
BLAKE2b-256 aeb8fd577991d11d6321c819bbebc9c87425203b5b28438e2609f8d8a40a62c2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

6.0.0 This release

2 files

5.2.0

2 files

5.1.0

2 files

5.0.0

2 files

4.0.1

2 files

4.0.0

2 files

3.0.0

2 files

2.0.0

2 files

1.0.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page