adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.11k stars 1.22k forks source link

audiomp3 on Qt Py ESP32-S3 #6556

Open scarolan opened 2 years ago

scarolan commented 2 years ago

I think it has enough horsepower and memory to run audiomp3...if you can add this to the built in modules for the Qt Py ESP32-S3 firmware, that would be awesome!

tannewt commented 2 years ago

IIRC, this isn't easy because the MP3 decoder library we use doesn't have xtensa assembly like it does for ARM. @jepler would be the person who looked into this.

timonsku commented 11 months ago

On the flow3r badge we use https://github.com/lieff/minimp3 in combination with micropython which gave us decent performance on the ESP32-S3 without any optimized assembly needed. Compiled with -O2.

Licensing is a bit mixed in the firmware but if you want a reference: https://git.flow3r.garden/flow3r/flow3r-firmware/-/tree/main/components?ref_type=heads

scarolan commented 9 months ago

amazing!

timonsku commented 9 months ago

is this actually resolved though?

neocao123 commented 8 months ago

any news?

kollibar commented 7 months ago

@jepler, do you think mp3 decoding will be add to esp-s3 board port ? thanks

BrainBoardz commented 7 months ago

I'm hoping that this lack of MP3 support in CP for the ESP32S3 can be sorted out in a future release of CP. It's very unfortunate that CP supports the S3 so well overall, and yet there is this gaping hole regarding audiomp3 support. MP3 playback is used for so many things (gaming, general audio, AI applications etc.) that not having this does limit the value of CP with respect to using it with ESP32s. I understand this is due to the lack of an xtensa assembly, so that this is just the way it will always be, and it likely cannot ever be resolved. But, if there is any way this could get sorted out it would be a very welcome addition.

dhalbert commented 7 months ago

It's not that it can't be resolved, but we have to find a new implementation of the MP3 decoder. minimp3 appears to be Creative Commons CC0, though the flow3r licensing is GPL, it appears.

timonsku commented 7 months ago

It's not that it can't be resolved, but we have to find a new implementation of the MP3 decoder. minimp3 appears to be Creative Commons CC0, though the flow3r licensing is GPL, it appears.

We did not do much here other than a couple convenience functions. We were forced into GPL unfortunately due to other dependencies and not wanting to overcomplicate things. Not sure how much of what we wrote for the Python side would be directly usable for CPY anyway.

Though I have some time open up atm, if you could use some help on that end could ask Limor if that might be something worth while to do for me?

BrainBoardz commented 7 months ago

Hi dhalbert and timonsku:

Thanks for the update. So that means that there is at least some potential for this to be resolved in the future if the technical challenges of implementing minimp3 could be worked out , but that the a more serious roadblock is licensing constraints. I guess this cant just be reverse engineered, Halt and Catch Fire style, ha ha. Would be amazing if it made it onto a todo list. The CP support for S3 works great. So close to perfection...

dhalbert commented 7 months ago

minimp3 is Creative Commons CC0. That is even more permissive than the MIT license we use.