acids-dataset
Warning
acids-datasetis still experimental, do not hesitate to open issues!
acids-dataset prepares audio data for generative models, such as RAVE and AFTER, and is open to custom use. It loads audio folders and gives PyTorch datasets and data loaders, with :
- two modes sharing the same interface : online datasets, that read raw audio folders directly (no compilation step), and pre-processed datasets, compiled in an LMDB database for fast training ;
- features, computed before-hand or on the fly : loudness, pitch, spectral, rhythmic, harmonic and spatial descriptors, neural embeddings, metadata extracted from file names... ;
- flexible outputs (tuples, dicts, slices) and audio augmentations with probabilities, including spatial / ambisonic transforms ;
- partitions (random, by file, by class, stratified over continuous features), class balancing, multi-dataset weighting and curriculum learning, compatible with distributed training and Lightning ;
- TorchScript modules of features and transforms, to reuse them at inference time ;
- a dataset browser and health reports to explore and check datasets ;
- presets to share parsing settings between datasets, scripts and the command line.
Installation
pip install acids-dataset
Python 3.10 or above is required. Optional dependencies :
| Extra | Installs | For |
|---|---|---|
acids-dataset[ui] |
gradio, matplotlib | the dataset browser |
acids-dataset[pesto], [crepe], [pyworld] |
pesto-pitch, torchcrepe, pyworld | additional pitch / F0 estimators (yin and pyin are available through librosa) |
Audio is loaded with soundfile (wav, flac, aiff, ogg, opus, mp3, with sample-accurate partial loading), and with torchcodec (FFmpeg) for other formats (m4a, aac...).
Quick start
from acids_dataset.datasets import AudioDataset
from acids_dataset.features import Loudness
# a raw folder gives an online dataset ; a pre-processed folder gives a pre-processed one
dataset = AudioDataset("path/to/audio", sr=44100, chunk_length=131072, features=[Loudness()],
output_pattern="{waveform,loudness}")
partitions = dataset.split({"train": 0.9, "valid": 0.1}, features=["original_path"], seed=0)
loader = partitions["train"].get_loader(batch_size=16, num_workers=4)
batch = next(iter(loader)) # {"waveform": (16, 1, 131072), "loudness": (16,)}
To compile a dataset (and use it exactly the same way) :
acids-dataset preprocess --path path/to/audio --out path/to/compiled --preset rave --feature loudness
acids-dataset info --path path/to/compiled --health # describe the dataset, and check its health
acids-dataset ui --path path/to/compiled # explore it in the browser
The command line also provides update (add features or files to a compiled dataset), add_embedding (embeddings of a TorchScript model) and presets. acids-dataset <command> --help lists the options of each command.
Documentation
The full documentation is on Read the Docs. It is written in docs/, with :
- a step by step tutorial, from loading audio to training with Lightning ;
- the user guide, by topic : datasets, loaders, features, augmentations, partitions, sampling, pre-processing, presets, command line, browser, extending the package ;
- the API reference, generated from the code.
Additional tutorials are available as Jupyter notebooks in extras/.
To build the documentation locally :
pip install -e ".[docs]" # or pip install -r docs/requirements.txt
mkdocs serve # local preview at http://127.0.0.1:8000
mkdocs build --strict # static site in site/
Development
pip install -e ".[ui]" pytest pytest-timeout gradio_client
pytest tests -m "not slow" # fast suite (~10 minutes)
pytest tests -m slow # long parametrized grids
tests/test_transforms.py has known failures (see TODO.md) and is not run in continuous integration. CI (.github/workflows/tests.yml) checks Python 3.10 compatibility with vermin, runs the fast suite on Python 3.10 to 3.13, and on Python 3.10 with the minimum versions of numpy, scipy, scikit-learn and librosa declared in pyproject.toml. See the development guide for details.
Contributors
Axel Chemla--Romeu-Santos and Nils Demerlé, at IRCAM (ACIDS team).
License
Creative Commons Attribution-NonCommercial 4.0 International.
Metadata
Release files for acids-dataset 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| acids_dataset-0.2.2.tar.gz | 368.2 kB | Without provenance | Details for acids_dataset-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| acids_dataset-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for acids_dataset-0.2.2-py3-none-any.whl |
Total release size: 698.9 kB
Release files / acids_dataset-0.2.2.tar.gz
| Download URL | acids_dataset-0.2.2.tar.gz |
|---|---|
| Size | 368.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44661b6a14fc5428bcf30f65c02143e482a60790fb1039999c7d7463a959eee8
|
|
BLAKE2b-256 checksum How to use checksums |
dbd3b8bb8fa834578b7850fdbdd652bb3795a96a49c715d5cae41a7d1bd63950
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / acids_dataset-0.2.2-py3-none-any.whl
| Download URL | acids_dataset-0.2.2-py3-none-any.whl |
|---|---|
| Size | 330.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ea5e71ff136ad795439321ade5b34ec4a83ebdc5ad8179db77a75ea8d880093
|
|
BLAKE2b-256 checksum How to use checksums |
73aac5f663a0efc266805a5504fb7f299bd889f8c22551f231ac5029028c479f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for acids-dataset 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.