Audiomate is a library for working with audio datasets.
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:
- Acoustic Event Dataset
- Mozilla Common Voice
- Fluent Speech Commands
- Free Spoken Digit Dataset
- German Distant Speech Corpus
- Google Speech Commands
- M-AILABS Speech Dataset
- LITIS Rouen Audio scene dataset
- Spoken Wikipedia Corpora
Currently supported formats:
pip install audiomate
Install the latest development version:
pip install git+https://github.com/ynop/audiomate.git
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
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.
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:
Editing the Documentation
To generate the documentation, execute:
pip install -e .[dev] cd docs make html
The generated files are written to
Versions is handled using bump2version. To bump the version:
In order to directly go to a final relase version (skip .dev/.rc/...):
bump2version [major,minor,patch] --new-version x.x.x
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/*
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size audiomate-6.0.0-py3-none-any.whl (259.2 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size audiomate-6.0.0.tar.gz (180.8 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for audiomate-6.0.0-py3-none-any.whl