Stream audio from ESP32 over WiFi #1739
-
Hi, My question seems simple, but I am finding it hard to arrive at a good plan of attack. I have an ESP32 and a MEMs microphone (analog? digital?) and I want to sample audio from the mic and send it over WiFi 'in real time' to any connected client. I would imagine that I would need at least 8Khz sample rate. I am running mono audio. I also have other data that I want to send over WiFi, but I don't need 8Khz, more like 256Hz (think accelerometer data). Right now, I am agnostic regarding the mic (analog? digital?), but I probably have to test both in order to find the lowest noise setup for my application. Where is the best place to start experimenting with in the audio tools that are here? It is a giant sprawling mass of examples, and I mean that in a good way! My initial thoughts are to have the ESP32 stand up a bare bones server on my WLAN so that I can connect to it via my laptop and receive the audio stream. I don't need to actually hear the audio in the laptop browser, the audio will go through DSP that will output derived info from the stream (think FFT power levels at specific frequencies, for example). That's why I am agnostic about whether the mic input is analog or digital. I just need to find the best way that allows enough bandwidth for me to send the other sensor data alongside the audio. Hope to hear from you soon. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
A good way to start is by reading the Wiki and follow the advice given in 'It's not working'; try to learn and test each processing step separately before you put things together. The audio quality using digtal mems microphones is usually better then the analog ones: Info can be found in the Hardware section. I suggest that you have a look at the communication wiiki and examples. I have never tried to send information over different channels, but I think you can try to use different ports and use separate tasks. |
Beta Was this translation helpful? Give feedback.
-
Thanks! This makes getting started less of a lift. |
Beta Was this translation helpful? Give feedback.
A good way to start is by reading the Wiki and follow the advice given in 'It's not working'; try to learn and test each processing step separately before you put things together.
The audio quality using digtal mems microphones is usually better then the analog ones: Info can be found in the Hardware section.
I suggest that you have a look at the communication wiiki and examples.
I have never tried to send information over different channels, but I think you can try to use different ports and use separate tasks.
Another approach would be to use a BinaryContainer and send the accelerometer data as metadata along with the audio