beetbox / audioread

cross-library (GStreamer + Core Audio + MAD + FFmpeg) audio decoding for Python
MIT License
483 stars 108 forks source link

Reading from from Buffer #92

Closed loretoparisi closed 5 years ago

loretoparisi commented 5 years ago

I'm using gensim smart_open to read the audio file directly from AWS S3:

with open('s3://mybucket/myprefix/audio.mp3', 'rb') as fin:
    y, sr = librosa.load(fin.read(), offset=30, duration=5)
    print(sr)

The problem is that librosa.read that uses audioread.audio_open seems to not support reading from a buffer, but only a path. Is there any other way? Not sure if this can be related to https://github.com/beetbox/audioread/issues/35 Thank you

sampsyo commented 5 years ago

Please see #53.

loretoparisi commented 5 years ago

@sampsyo thank you. Any plan to merge the audioread.decode to the master branch?

sampsyo commented 5 years ago

Looks like that branch needs a little help to deal with a Python 2 issue, do some testing, and write some documentation! Any chance you'd be interested in helping out?