0

I know that MP3 is the most popular audio format out there, but I need to be able to convert them to wav files for bother project I'm working on. It can be done with a PC but I would like to know if there is a way of decoding a MP3 file and turning it into a pcm wav file on an Arduino. I don't want to use an extra chip, as I do not plan on playing the MP3s, just converting them.

2

The mp3 audio coding is not just one mathematical calculation. To decode every mp3 file you need a complete package and enough memory. That is not something for a simple arduino board.

There are libraries to decode for example a jpg file or a mp3 file. They have restrictions and you need a faster processor.
Adafruit has made a start: https://learn.adafruit.com/native-mp3-decoding-on-arduino/, but you need a powerful non-standaard arduino-compatible board. That library does not use I2S yet.

I suggest to use a Raspberry Pi.

2
  • It's something I made a start on too. Porting the Microchip code. However, it will not, and will never, run on a little Arduino. It's intended for chipKIT boards with hundreds of kB of RAM. – Majenko Aug 11 '18 at 9:20
  • Isn't there a way to decode a segment at a time? I would like to read a sector, decode it, write it to a file, then repeat. If necessary, would it be possible to use a temporary file on an sd card as spare memory? – Rowan Radosav - McRae Aug 14 '18 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.