Audio ML Spec Tools
Convenience functions for generating ML features from audio data. Breaks audio ML dependencies on torchaudio. Unlike pytorch features, these functions can be exported to ExecuTorch and ONNX with no issues.
Motivation
Except in specific circumstances like wav2vec, raw audio has proven to be a much worse input for ML models than spectrogram-based features across a wide variety of problem domains, including environmental sound classificarion (Guzhov et al. (2021)), singing technique classification (Yamamoto et al. (2021)), and ship classification (Xie, Ren, and Xu (2024)).
There is no scientific consensus on the relative benefits of mel-scale spectrograms, linear spectrograms, and MFCCs. Different researchers have shown good results with each type of spectrogram; see respectively Raponi, Oligeri, and Ali (2021), Jung at al. (2021), and Razani et al (2017).
With this library, you can easily try as many feature extraction methods as you want to see what works for your use case.
Prerequisites
- Python 3.12 runtime
pipfor package installation- Note that
torchcodecdepends on a system installation of FFmpeg
Installation
- Install using pip:
pip install AudioMlSpecTools
Local Installation
Install the dependencies and library with pip:
pip install .
Usage
See examples/features.py.
Testing
# If needed, install test dependencies
# pip install .[test]
python3 -m coverage run -m unittest discover -s test -p "*_test.py" && python -m coverage report --skip-covered
python -m coverage html
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Ryan Quinn - Initial work
License
MIT.
Metadata
Release files for AudioMlSpecTools 0.15.1
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 |
|---|---|---|---|---|
| audiomlspectools-0.15.1.tar.gz | 18.4 kB | Without provenance | Details for audiomlspectools-0.15.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| audiomlspectools-0.15.1-py3-none-any.whl | Python 3 | none | any | Details for audiomlspectools-0.15.1-py3-none-any.whl |
Total release size: 44.8 kB
Release files / audiomlspectools-0.15.1.tar.gz
| Download URL | audiomlspectools-0.15.1.tar.gz |
|---|---|
| Size | 18.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b27565715fc38362d96852189d22b399414856a8eac0be23ca5aab9d03057ae
|
|
BLAKE2b-256 checksum How to use checksums |
24900bc776ae2a80fefbf7f34b6874c0677eb7ca4388a8f2a3d5b1b45756bd9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / audiomlspectools-0.15.1-py3-none-any.whl
| Download URL | audiomlspectools-0.15.1-py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47e0b8b7de858f080c2723aa7901b3c2d6e003fdc775de6d050a47deac8d77ca
|
|
BLAKE2b-256 checksum How to use checksums |
e2e7fd60fd5e2c4b6c2875ff015ade3f448547d4cac483be1233418cc4f351a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for AudioMlSpecTools 0.15.1
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.