audioread icon indicating copy to clipboard operation
audioread copied to clipboard

In memory decoding

Open akademi4eg opened this issue 8 years ago • 3 comments

Hi guys! I have audio files contents stored in-memory and need to decode audio. In current version all backends accept pathlike argument (which is then passed to open()).

Are there any plans to extend your interface to also accept streams of data (e.g. BytesIO)?

akademi4eg avatar Jun 23 '17 14:06 akademi4eg

I use only wav-files and already have implementation for them. Would you accept a PR with updated RawAudioFile backend?

akademi4eg avatar Jun 23 '17 14:06 akademi4eg

Yep! We're working on that in #35 and #37. The latter has a basically-working implementation for in-memory decoding for one backend, FFmpeg. There are just a few more details to hammer out with the high-level interface, and it would be great to have a raw-audio backend too! If you're interested in taking the lead, I'd be very enthusiastic (and I'd help!).

sampsyo avatar Jun 23 '17 14:06 sampsyo

The branch under development for this is:

https://github.com/beetbox/audioread/tree/compressed-audio

I'm using this branch in another project to decode mp3 data. See e.g., https://github.com/jksinton/littlesleeper2/blob/master/littlesleeper.py#L453

jksinton avatar Jun 23 '17 14:06 jksinton