audioread
audioread copied to clipboard
In memory decoding
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)?
I use only wav-files and already have implementation for them. Would you accept a PR with updated RawAudioFile backend?
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!).
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