5
votes

I have been trying to stream speech( May extend to audio) at 16Khz over the wifi HTTP TCP/IP. I have started of with ESP8266 wifi module considering its compatibility with Arduino and other platforms.

During the course I had to figure out the feasibility of ESP8266 to stream at 16KHz. This link says ( http://espressif.com/en/products/esp8266/ ) it's capable but found contradicting views over other forums.

  1. But is it really possible to have a I2S on such a small cpu..?

I proceeded with the Idea of bit banking and using GPIO but the max frequency available with GPIO is 1KHz( ie. the PWM). The firmware used here was NODEmcu and LUA script- https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en.

  1. Is it a hardware limitation or the firmware limitation..?

  2. Can anyone guide me to access I2S on ESP and also assure its compatibility to stream at 16KHZ.

1
So you haven't actually tried the I2S interface yet? What does the device datasheet / programming guide say? - John U
did you get any further with your efforts ? I am thinking of streaming video - so not sure if that would work either. - DrBug
Hi I tried a lot the device data says I2S is available but no much support. Later I tried to measure the frequency (throughput) of its pins and the max i could note was 1K so dropped the idea of using ESP826. May have a solution in latest dates haven't followed much the task of accomplished. - Harry
@harry I checked the datasheet and it says that spi should be used to interface with external codecs, furthur you cant shouldnt use gpio for such applications try using i2c banks for such applications it will provide you with much higher frequency, not sure if it will reach 16k.... - fazkan

1 Answers

0
votes

Lua is interpreted and so programs written in it will not get the maximum performance possible from the ESP8266. It is now possible to program the ESP8266 form the Arduino IDE using it's version of C. This is compiled and likely to be far faster.

I found LUA apps unreliable. I've written a few programs using the Arduino IDE and they are rock solid, so I recommend that path. (https://www.youtube.com/watch?v=hu-g-XTCEpU) I've also seen a video of someone streaming audio using an ESP8266 but they added extra hardware for buffering. Sorry I don't have that link.