Replies: 10 comments 14 replies
-
A search on MP3 in the Adafruit site yields solutions based on the VS1053b chip. There is already a MicroPython driver for this here. A software-only driver powering an I2S output would be nice, but I'm not aware of such a thing. |
Beta Was this translation helpful? Give feedback.
-
Thanks for that Peter. I ordered a few breakout boards with that chip and will check it out. And thanks for making the driver for it! |
Beta Was this translation helpful? Give feedback.
-
If I understand it right then Circuitpython has a module that enables mp3 decoding natively, the source is here. |
Beta Was this translation helpful? Give feedback.
-
Yes, that would really be great if it were also available for Micropython! |
Beta Was this translation helpful? Give feedback.
-
That's a serious limit for most boards supporting MicroPython. It would work with some MIMXRT boards like Teensy 4.x and some STM32x7 boards like the PYBD_SF6. But hardly with any ESP32 or RP2 device. And it requires a SD card as data source. So better use an external MP3 decoding chip. |
Beta Was this translation helpful? Give feedback.
-
Note that the CircuitPython player has some serious limitations on the files it can play back:
These aren't going to sound great, especially not through a 1-bit PWM output. |
Beta Was this translation helpful? Give feedback.
-
@Guustaaf @peterhinch hi guys, I am trying to complete an internet radio project of which I can already connect and download mp3 files to an SD card. Would I be correct in assuming that if I had a VS1053 MP3 shield like the one pictured by Guustaaf in this thread that I could just play the mp3 files directly to the output using SPI. Stumbling upon this thread I was also interested to find the link to peterhinch's VS1053 device driver module and I have downloaded the zip file from git hub, I am sure I can make use of this driver but before I get too deep into that I am hoping someone can tell me that all I need is SPI. Regarding boards I see Adafruit have a breakout for ~$25 Ali Express for as low as ~$3 and many more if you Google, but to split the difference I will order a shield at ~$15 that looks just like the one pictured here, mainly because I can get it within 5 days with free shipping. Whatever happens I will post back here with feedback. BTW my project is based around the Arduino Nano ESP32 with Micropython. |
Beta Was this translation helpful? Give feedback.
-
The docs tell you all you want to know. Follow the link to the driver you want to use for wiring details. |
Beta Was this translation helpful? Give feedback.
-
@peterhinch @Guustaaf I put this project to one side for 3 months, for various reasons, but revisited it a couple of weeks ago. I have to thank you guys the results are outstanding and the audio quality is really good. I created one project as an internet radio and a second as a MP3 music player. Both projects were built with a nano ESP32, an Arduino MP3 VS 1053 shield (pictured above) and Peters drivers vs1053_syn.py and sdcard.py. I plugged a $10 BT transmitter into the SPK jack of the shield which gives me the option to listen with any bluetooth device I have. I still have to mount the electronics into project boxes and have yet to include a pot for volume. Lastly I think I would have been better off with Peters vs1053_asyn.py which I may look into further at some point. Thanks again I can't believe how good a micropython project this turned out to be. |
Beta Was this translation helpful? Give feedback.
-
Can anyone understand this mp3 decoder in c? It is written for micropython: https://github.com/labplus-cn/mpython/blob/master/port/drivers/codec/audio_player.c#L157 According to my observation, it is using a mp3 decoder called 'helix': https://github.com/labplus-cn/mpython/tree/master/port/drivers/codec/codec_lib/helix/src Hope it solves problems. But don't put it into core micropython library, it is kind of big. A wav decoder is enough just like cpython did. |
Beta Was this translation helpful? Give feedback.
-
CircuitPython has this great looking MP3 module.
MicroPython needs this too!
Calling all C++ geniuses!
My Picos with DACs are awaiting your heroic efforts. 🥇
Thanks!
Guustaaf
Beta Was this translation helpful? Give feedback.
All reactions