Sitelet https://github.com/bastibe/python-soundfile/issues/439
Skip to content

Cannot read mp3 with file-like object #439

Description

@BakerBunker

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions