Audiomate is a library for working with audio datasets.
Project description
AUDIOMATE
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 = utterance.label_lists[audiomate.corpus.LL_SOUND_CLASS][0].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:
- Acoustic Event Dataset
- AudioMNIST
- Mozilla Common Voice
- ESC-50
- Free Spoken Digit Dataset
- German Distant Speech Corpus
- Google Speech Commands
- GTZAN
- M-AILABS Speech Dataset
- MUSAN
- LITIS Rouen Audio scene dataset
- Tatoeba
- TIMIT
- Urbansound8k
- Voxforge
Currently supported formats:
Indirectly supported datasets (Details):
Installation
pip install audiomate
Install the latest development version:
pip install git+https://github.com/ynop/audiomate.git
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]
python setup.py test
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]
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
Built Distribution
Hashes for audiomate-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20b5e1d8a94155b2773a8590e5ab55521fc36cf32f30bbf9bfdabf0b2ba836ea |
|
MD5 | 59a2d1377a319d8901ed554a7728529e |
|
BLAKE2b-256 | d337db90a02ed8e07dd6725c3e4ef0ee11966cb4b869f4e0c01aa07adb8d079c |