PySoundFile failed. Trying audioread instead.

3,013 views
Skip to first unread message

Timothy Kolar

unread,
Dec 10, 2021, 2:54:46 PM12/10/21
to lib...@googlegroups.com
This warning is easy enough to ignore, but I'm trying to understand why it exists in the first place.  From my perspective the library is behaving perfectly.

Presumably there are side effects to using audioread instead of PySoundFile?  Is there a list somewhere?

Thanks

Brian McFee

unread,
Dec 10, 2021, 3:03:18 PM12/10/21
to librosa
This mainly occurs when loading mp3s, which are currently not supported by libsndfile.  This is due to change in the near future, but in the meantime, we revert to audioread to decode mp3s and other unsupported formats if possible.

I wouldn't say there are side effects to using audioread instead, but there are features that it does not provide, notably working with stream data (instead of files on disk) and block-wise decoding.  Audioread can also be much slower than libsndfile, but that will depend on the specifics of the data being decoded.  There may also be differences in supported bit depth, but that is also codec-dependent.

Some of this is documented in our section on IO: https://librosa.org/doc/latest/ioformats.html , and otherwise it's in the docs for load() and stream().
Reply all
Reply to author
Forward
0 new messages