You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.10.0.
If you have questions about how to use librosa, please consult the discussion forum. For bug reports and other, more technical issues, consult the github issues.
Here are a few of the most common problems that users encounter.
no attribute ‘display’
If you’re trying to run some example code, and encounter the following error message:
AttributeError: module 'librosa' has no attribute 'display'
it is because the
librosa.display submodule needs to be imported explicitly.
This is because
matplotlib is an optional dependency for librosa, so we do not
assume that all users have it installed, or want plotting capability.
To fix the problem, add the line
to the beginning of your program.
If you’re loading an audio file, and see the following message:
UserWarning: PySoundFile failed. Trying audioread instead.
Do not worry. This is a warning, not an error. Odds are that your code is working just fine.
This warning is most often triggered by loading files encoded with mp3 format,
which are not supported by libsndfile prior to version 1.1.
When this situation is detected, librosa falls back to use the slower, but more
audioread-based file loader.