beetbox / audioread

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

aubio backend #46

Open piem opened 7 years ago

piem commented 7 years ago

hi there,

Not really a bug, not really a PR: I played around with aubio and audioread to see how they could work together.

Using aubio's current HEAD and python3, this simple backend for aubio works well, including on remote streams.

This is vastly inefficient though, since aubio's arrays of floats need to be flattened back to a buffer of shorts, but for some reason I thought I should make some noise about it. :-)

cheers, piem

sampsyo commented 7 years ago

Cool; thanks for the pointer! It looks like aubio uses libav under the hood to do decoding—out of curiosity, is there an advantage you were going for over using libav/ffmpeg directly in audioread? (Perhaps just that you already have it installed?)

piem commented 7 years ago

I think aubio can be a bit faster than audioread, so I was hoping I could help save some cycles here too. The core of aubio is written in C and used from a few other languages; I use python-aubio a lot to develop and test the core library.

sampsyo commented 7 years ago

Nice! That is quite fast.