Introduction
MindAudio is a toolbox of audio models and algorithms based on MindSpore. It provides a series of API for common audio data processing,data enhancement,feature extraction, so that users can preprocess data conveniently. Also provides examples to show how to build audio deep learning models with mindaudio.
data processing
# read audio
>>> import mindaudio.data.io as io
>>> audio_data, sr = io.read(data_file)
# feature extraction
>>> import mindaudio.data.features as features
>>> feats = features.fbanks(audio_data)
Installation
Install with PyPI
The released version of MindAudio can be installed via PyPI as follows:
pip install mindaudio
Install from Source
The latest version of MindAudio can be installed as follows:
git clone https://github.com/mindspore-lab/mindaudio.git
cd mindaudio
pip install -r requirements/requirements.txt
python setup.py install
Get started with audio data analysis
mindaudio provides a series of commonly used audio data processing apis, which can be easily invoked for data analysis and feature extraction.
>>> import mindaudio.data.io as io
>>> import mindaudio.data.spectrum as spectrum
>>> import numpy as np
>>> import matplotlib.pyplot as plt
# read audio
>>> audio_data, sr = io.read("./tests/samples/ASR/BAC009S0002W0122.wav")
# feature extraction
>>> n_fft = 512
>>> matrix = spectrum.stft(audio_data, n_fft=n_fft)
>>> magnitude, _ = spectrum.magphase(matrix, 1)
# display
>>> x = [i for i in range(0, 256*750, 256)]
>>> f = [i/n_fft * sr for i in range(0, int(n_fft/2+1))]
>>> plt.pcolormesh(x,f,magnitude, shading='gouraud', vmin=0, vmax=np.percentile(magnitude, 98))
>>> plt.title('STFT Magnitude')
>>> plt.ylabel('Frequency [Hz]')
>>> plt.xlabel('Time [sec]')
>>> plt.show()
Result presentation:
What's New
- 2023/06/24: version 0.1.1, bug fix and readme update
- 2023/03/30: version 0.1.0, including 50+ data processing APIs, 5 models supported.
- 2022/09/30: beta, 33 data APIs + 3 models
Contributing
We appreciate all contributions to improve MindSpore Audio. Please refer to CONTRIBUTING.md for the contributing guideline.
License
This project is released under the Apache License 2.0.
Citation
If you find this project useful in your research, please consider citing:
@misc{MindSpore Audio 2022,
title={{MindSpore Audio}:MindSpore Audio Toolbox and Benchmark},
author={MindSpore Audio Contributors},
howpublished = {\url{https://github.com/mindspore-lab/mindaudio}},
year={2022}
}
Metadata
Release files for mindaudio 0.3.0
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 |
|---|---|---|---|---|
| mindaudio-0.3.0.tar.gz | 125.4 kB | Without provenance | Details for mindaudio-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mindaudio-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for mindaudio-0.3.0-py3-none-any.whl |
Total release size: 269.5 kB
Release files / mindaudio-0.3.0.tar.gz
| Download URL | mindaudio-0.3.0.tar.gz |
|---|---|
| Size | 125.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34896941f1f163739e64a588c9070ec7253056f8172a68eaccecaf3efbaa14ba
|
|
BLAKE2b-256 checksum How to use checksums |
a24826a6fdce982e412f16c6b453eb973680bc9aa6aef15452a4fbe407eb27cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / mindaudio-0.3.0-py3-none-any.whl
| Download URL | mindaudio-0.3.0-py3-none-any.whl |
|---|---|
| Size | 144.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e24f2f84f17be1588beaa65278c6b9c48c34277912060285de9c125de4cfa67
|
|
BLAKE2b-256 checksum How to use checksums |
0b082651ef3dbf670e298ee785d7c915f94893d571e62c7b030e2f7e9de66ebf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for mindaudio 0.3.0
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.