librosa#

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.

Installing librosa#

The simplest way to install librosa is through the Python Package Index (PyPI). This will ensure that all required dependencies are fulfilled. This can be achieved by executing the following command:

pip install librosa

If you use conda/Anaconda environments, librosa can be installed from the conda-forge channel:

conda install -c conda-forge librosa

If you’ve downloaded the archive manually from the releases page, you can install using the setuptools script:

tar xzf librosa-VERSION.tar.gz
cd librosa-VERSION/
python setup.py install

If you intend to develop librosa or make changes to the source code, you can install with pip install -e to link to your actively developed source tree:

tar xzf librosa-VERSION.tar.gz
cd librosa-VERSION/
pip install -e .

Alternately, the latest development version can be installed via pip:

pip install git+https://github.com/librosa/librosa

Citing librosa#

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 DOI badge. This ensures that all contributing authors are credited for the work you are building on.

You can also find the DOI for your currently installed version by running the following command in Python:

print(librosa.cite())

And if you want a BibTeX entry for your paper, you can run:

print(librosa.cite(bib=True))

If you wish to cite librosa for its design, motivation etc., please cite the librosa paper published at SciPy 2015. [1]

As a rule of thumb:

  • Use a versioned librosa citation to document the software implementation used in your experiments.

  • Cite the original methodological papers for the algorithms that are central to your work.

  • Cite the SciPy paper when discussing librosa itself, its design, or its contribution as a software library.