Python library for audio and music analysis
librosa is a Python library for audio and music signal processing. It provides the foundational algorithms and tools required for building music information retrieval (MIR) systems.
Full documentation is available at:
If you're new to librosa, we recommend starting with the tutorials.
If you're looking for API details, head directly to the API reference.
To see what's new, check out the change log.
The latest stable release is available on PyPI, and you can install it by the command
pip install librosaAnaconda users can install using conda-forge:
conda install -c conda-forge librosaFor optional dependencies and advanced setup, see the guide in the documentation.
There are two ways to cite librosa in scholarly work, depending on whether you are citing it for its use in your work or for its design and motivation.
We additionally encourage you to cite the original publications describing the methods implemented in librosa, in addition to citing librosa itself. References can often be found within function documentation.
If you are citing for use in your own work, please cite the version you used by retrieving the appropriate DOI and citation information from Zenodo. This ensures that all contributing authors are credited for the work you are building on.
From librosa version 0.10.2 or later, you can also use librosa.cite() to get the DOI link for any version of librosa:
import librosa
librosa.cite()And from 1.0 onward, you can directly retrieve the BibTeX entry for the version you are using:
print(librosa.cite(bib=True))If you wish to cite librosa for its design, motivation, etc., please cite the paper published at SciPy 2015:
McFee, Brian, Colin Raffel, Dawen Liang, Daniel PW Ellis, Matt McVicar, Eric Battenberg, and Oriol Nieto.
"librosa: Audio and music signal analysis in python."
In Proceedings of the 14th python in science conference, pp. 18-25. 2015.As a rule of thumb:
time_stretch/pitch_shift crash on documented STFT kwargs (pad_mode, dtype)
feature.spectral_centroid / bandwidth / rolloff / contrast / poly_features upcast float32 spectrogram to float64
Refactor display.py into submodules
feature.mfcc: expose `power_to_db` parameters, as proposed in #1734
Discussion: deprecate hybrid and pseudo cqt?
Librosa on Debian!
[Bug]: chroma_stft (via estimate_tuning/piptrack) leaves unreturned memory in the glibc arena, growing RSS across repeated calls
[ENH]: Extend precise return type annotations to the feature and onset modules
Frequency range data
Improvements to adaptive waveplot