python-soundfile
python-soundfile copied to clipboard
Cannot read mp3 with file-like object
I tried to read a mp3 with file handle, but soundfile failed to read.
import soundfile as sf
ret = sf.read("052316.mp3")
print(ret)
try:
sf.read(open("052316.mp3", "rb"))
except Exception as e:
print(e)
it shows
(array([[0., 0.],
[0., 0.],
[0., 0.],
...,
[0., 0.],
[0., 0.],
[0., 0.]]), 44100)
Error opening <_io.BufferedReader name='052316.mp3'>: Format not recognised.
and here is the file 052316.mp3.zip