-->
Page 1 of 27

Demo: I2S sound output and MP3 decoding in an ESP8266

PostPosted: Fri Jun 05, 2015 5:55 am
by Sprite_tm
(Shameless copy of my message on the official board, but I think people may want to discuss it here too...)

As you all may know, the specsheet for the ESP8266 describes the chip as having an I2S port, which is a port to which you can connect an I2S DAC to get sound in and out of the chip. Unfortunately, up until now no documentation or examples about this port were available. We're working on these documents and examples right now, and I have taken the preliminary documentation and with the help of some colleagues here at Espressif have whipped up a little demonstration which uses HTTP to stream an MP3 stream (eg. webradio) to an I2S DAC. It basically is a standalone webradio streamer, everything (WiFi, HTTP streaming, MP3 decoding) happens inside the ESP8266. The only components you need to get good audio quality are an I2S audio DAC for audio output and a 23LC1024 SPI RAM chip for buffering of the MP3 stream. If bad quality audio and stuttering is acceptable, there even is a mode where you can stream audio without these two components: using only an ESP module (in theory, an ESP01 would work), a power supply and an amplifier/speaker you can get reasonable quality sound.

The code is at the official Espressif Github: https://github.com/espressif/esp8266_mp3_decoder
Be sure to read the README.md in the archive, configuration and use of the decoder can be a bit tricky.

Ah, and sorry, I can't provide any binaries here: linking the GPLled MAD code with the closed-source ESP libs creates a binary that's illegal to distribute, plus the access point and stream configuration are compile-time options only.

Re: Demo: I2S sound output and MP3 decoding in an ESP8266

PostPosted: Fri Jun 05, 2015 6:45 am
by hdrut
Great news, finally I2S !
Thks for this, i'll give it a try asap and let you know the outcomes.

Greetings to all Espressif team!

Horacio

Re: Demo: I2S sound output and MP3 decoding in an ESP8266

PostPosted: Fri Jun 05, 2015 10:15 am
by hdrut
Cooooool, listening to DI.fm already :P

Got to get some flash and DAC ics soon !!

Thks again Jeroen.

MVG

Horacio

Re: Demo: I2S sound output and MP3 decoding in an ESP8266

PostPosted: Fri Jun 05, 2015 12:23 pm
by martinayotte
Congrat Sprite_tm !
Is that work was part of your new job ? ;)