Yeahh, the title explains everything….
That’s a pretty complex task. I don’t think there are any easy ways for the micro:bit to do either, read from a flash drive or play an mp3. It may be better to look at a more sophisticated device, like a RaspberryPi. Pis already support for things like reading from drives and playing mp3s.
There are C++ libraries for decoding MP3s, so not that difficult, although you would obviously have to use C++.
USB host is difficult, you would need external hardware. Something like a Teensy 3.6 or a Teensy 4.1 has hardware and software support for reading files off a flash drive. (Again, in C++)
What is easier, is interfacing a SD card in SPI mode - that requires less hardware and software support is easy, but I don’t know if any MakeCode extensions to read that. There is support for that in C++ (Arduino) and MicroPython.
So the easiest way would be to switch to Arduino and wire up a SD card and speaker amp, but external hardware is needed.
What about tje Melwbit? Buildt in sd?
It appears the Meowbit has all the hardware necessary to read files off an SD card, with the inclusion of a SD card slot. I haven’t looked too much into it, but it shouldn’t be much work to get Arduino running on it. You probably will still need the speaker amp because I don’t think you will get very good sound quality with a buzzer.
I have a 1.5 amp speaker. The only thing I need is read from the sdcard and decode the mp3
To do this on the microbit you want to put it on the flash storage then play it. Only for micro:bit v2 I think. Maybe use the add file option in python.microbit.org? Make a scratch project or something to convert the whole mp3 to text then put it as a variable in the project, like music = “converted mp3 here” or music = [converted,mp3,here]