Package: librosa
librosaA python package for music and audio analysis.Table of ContentsDocumentationInstallationUsing PyPIUsing AnacondaBuilding From SourceHints for InstallationsoundfileaudioreadLinux (apt get)Linux (yum)MacWindowsDiscussionCitingDocumentationSeehttps://librosa.org/doc/for a complete reference manual and introductory tutorials.Theadvanced example galleryshould give you a quick sense of the kinds
of things that librosa can do.Back To Top ↥InstallationUsing PyPIThe latest stable release is available on PyPI, and you can install it by sayingpython -m pip install librosaUsing AnacondaAnaconda users can install usingconda-forge:conda install -c conda-forge librosaBuilding from sourceTo build librosa from source, saypython setup.py buildThen, to install librosa, saypython setup.py installIf all went well, you should be able to execute the following commands from a python console:import librosa
librosa.show_versions()This should print out a description of your software environment, along with the installed versions of other packages used by librosa.📝 OS X users should follow the installation guide given below.Alternatively, you can download or clone the repository and usepipto handle dependencies:unzip librosa.zip
python -m pip install -e librosaorgit clone https://github.com/librosa/librosa.git
python -m pip install -e librosaBy callingpip listyou should seelibrosanow as an installed package:librosa (0.x.x, /path/to/librosa)Back To Top ↥Hints for the Installationlibrosausessoundfileandaudioreadto load audio files.📝 Note that older releases ofsoundfile(prior to 0.11) do not support MP3, which will cause librosa to fall back on theaudioreadlibrary.soundfileIf you're usingcondato install librosa, then audio encoding dependencies will be handled automatically.If you're usingpipon a Linux environment, you may need to installlibsndfilemanually.  Please refer to theSoundFile installation documentationfor details.audioreadand MP3 supportTo fuelaudioreadwith more audio-decoding power (e.g., for reading MP3 files),
you may need to install eitherffmpegorGStreamer.📝Note that on some platforms,audioreadneeds at least one of the programs to work properly.If you are using Anaconda, installffmpegby callingconda install -c conda-forge ffmpegIf you are not using Anaconda, here are some common commands for different operating systems:Linux (apt-get):apt-get install ffmpegorapt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-uglyLinux (yum):yum install ffmpegoryum install gstreamer1.0-plugins-base gstreamer1.0-plugins-uglyMac:brew install ffmpegorbrew install gstreamerWindows:download ffmpeg binaries from thiswebsiteor gstreamer binaries from thiswebsiteFor GStreamer, you also need to install the Python bindings withpython -m pip install pygobjectBack To Top ↥DiscussionPlease direct non-development questions and discussion topics to our web forum athttps://groups.google.com/forum/#!forum/librosaBack To Top ↥CitingIf you want to cite librosa in a scholarly work, there are two ways to do it.If you are using the library for your work, for the sake of reproducibility, please cite
the version you used as indexed at Zenodo: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.Back To Top ↥