【Feedback】I2S sound output and MP3 decoding in an ESP8266
-
- Posts: 25
- Joined: Fri Oct 24, 2014 7:58 pm
【Feedback】I2S sound output and MP3 decoding in an ESP8266
Postby ESP_Sprite » Fri Jun 05, 2015 6:49 pm
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.
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.
Re: I2S sound output and MP3 decoding in an ESP8266
Postby rudi » Sun Jun 07, 2015 12:34 pm
ggggggrrrrrrreeeeeáaaaaaaaaattttt!!!!
sprite!
ESP8266 goes MP3 (320 Kb)
DONE!

you did it again. ( 2:1 )
perfect - no problems - test without the 2 ICS - hear with in ear phone'S and
it runs perfect!
i hear just in time in 320 kb/s streaming mp3 "summerbeat 2013" from simpy test IIS7 server.
my extended favorit tip:
run mediaserver (media encoder...) - stream audio ( voice, or other src ) over media server and you will have the babyphone ( wifi speaker ) with ESP8266 mp3

"10K thanks button"
txs! great work - sprite clear code - fine struct -
and espressif - fine documented - nice!!!
now its time for next surprise ...
best wishes
rudi
btw
welcome to espressif team!

sprite!
ESP8266 goes MP3 (320 Kb)
DONE!

you did it again. ( 2:1 )

it runs perfect!
i hear just in time in 320 kb/s streaming mp3 "summerbeat 2013" from simpy test IIS7 server.
my extended favorit tip:
run mediaserver (media encoder...) - stream audio ( voice, or other src ) over media server and you will have the babyphone ( wifi speaker ) with ESP8266 mp3

"10K thanks button"
txs! great work - sprite clear code - fine struct -
and espressif - fine documented - nice!!!
now its time for next surprise ...
best wishes
rudi

btw

welcome to espressif team!

-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Re: I2S sound output and MP3 decoding in an ESP8266
Postby Roie » Tue Jun 16, 2015 9:47 pm
What do you mean?
if my understanding is current, the MEMS Microphone get a clock and push data over I2S
btw,
i also try to loop every 20ms I2SRXFIFO, but still not working
data = (uint8)(READ_PERI_REG(I2SRXFIFO)&0xff);
if my understanding is current, the MEMS Microphone get a clock and push data over I2S
btw,
i also try to loop every 20ms I2SRXFIFO, but still not working
data = (uint8)(READ_PERI_REG(I2SRXFIFO)&0xff);
Re: I2S sound output and MP3 decoding in an ESP8266
Postby rojer » Sat Jan 02, 2016 1:03 am
thanks for this, a very useful example!
i have question regarding bit/word clock generation: i am considering ESP8266 for an application which does both output (to a speaker) and input (from a microphone). i see that bit and word clock lines on ESP are separate, but the DAC/ADC i am considering uses the same BCK/WS for input and output. so the question is: (1) does ESP generate I2S clock only when there is data to output? and (2) can it use its own clock for I2S input, preferably without physically connecting I2SI_{BCK,WS} to their I2SO counterparts (to free up pins for other functions)?
i have question regarding bit/word clock generation: i am considering ESP8266 for an application which does both output (to a speaker) and input (from a microphone). i see that bit and word clock lines on ESP are separate, but the DAC/ADC i am considering uses the same BCK/WS for input and output. so the question is: (1) does ESP generate I2S clock only when there is data to output? and (2) can it use its own clock for I2S input, preferably without physically connecting I2SI_{BCK,WS} to their I2SO counterparts (to free up pins for other functions)?
Re: I2S sound output and MP3 decoding in an ESP8266
Postby ESP_Greg » Thu Jun 30, 2016 11:54 am
You can try with the latest SDK. Some guy already make it work.
Re: I2S sound output and MP3 decoding in an ESP8266
Postby ozzoxy » Fri Jul 29, 2016 1:23 am
Many many thanks ESP_Rubin,
I have gotten some questions,
In the README file I get some information
Configuration options, building
All high-level options can be configured in mp3/user/playerconfig.h. Edit that file to set up your access point and a webradio stream or other source of MP3 data served over HTTP.
1. I have *.h editor like Pic C Complier And also i can edit this file taking knowledge in the playerconfig.h explanation
To build the code, try running make.sh in the mp3/ directory. Alternatively, the way to use 'make' to build this code is: make COMPILE=gcc BOOT=none APP=0 SPI_SPEED=40 SPI_MODE=QIO SPI_SIZE=1024
2. How can i run make.sh to generate .bin files as eagle.flash.bin eagle.irom0text.bin. i mean are there any compier for windows.
After that i have to flash esp8266 with these .bin files. What kind of program should i use. Could you give me a name? to success.
I have bought VS1003
http://www.aliexpress.com/item/Free-Shipping-5PCS-23LC1024-I-SN-23LC1024-SRAM-1MBIT-SDI-SQI-20-MHZ-SOP8/32653345044.html?spm=2114.13010608.0.74.xrvjXB
and 23LC1024 ram
http://www.aliexpress.com/item/Free-Shipping-5PCS-23LC1024-I-SN-23LC1024-SRAM-1MBIT-SDI-SQI-20-MHZ-SOP8/32653345044.html?spm=2114.13010608.0.74.xrvjXB
3. These components can be run with this project.
Best regards.
I have gotten some questions,
In the README file I get some information
Configuration options, building
All high-level options can be configured in mp3/user/playerconfig.h. Edit that file to set up your access point and a webradio stream or other source of MP3 data served over HTTP.
1. I have *.h editor like Pic C Complier And also i can edit this file taking knowledge in the playerconfig.h explanation
To build the code, try running make.sh in the mp3/ directory. Alternatively, the way to use 'make' to build this code is: make COMPILE=gcc BOOT=none APP=0 SPI_SPEED=40 SPI_MODE=QIO SPI_SIZE=1024
2. How can i run make.sh to generate .bin files as eagle.flash.bin eagle.irom0text.bin. i mean are there any compier for windows.
After that i have to flash esp8266 with these .bin files. What kind of program should i use. Could you give me a name? to success.
I have bought VS1003
http://www.aliexpress.com/item/Free-Shipping-5PCS-23LC1024-I-SN-23LC1024-SRAM-1MBIT-SDI-SQI-20-MHZ-SOP8/32653345044.html?spm=2114.13010608.0.74.xrvjXB
and 23LC1024 ram
http://www.aliexpress.com/item/Free-Shipping-5PCS-23LC1024-I-SN-23LC1024-SRAM-1MBIT-SDI-SQI-20-MHZ-SOP8/32653345044.html?spm=2114.13010608.0.74.xrvjXB
3. These components can be run with this project.
Best regards.
Who is online
Users browsing this forum: No registered users and 1 guest
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.