Interested in ESP32 Audio: ua-cam.com/play/PL5vDt5AALlRfGVUv2x7riDMIOX34udtKD.html Looking for all my ESP32 projects: ua-cam.com/play/PL5vDt5AALlRdN2KyL30l8j7kLCxhDUrNw.html
Thanks a lot! I thought the INMP1441 I had bought was broken because it didn't work at all, but your explanation and your code made it work beautifully!
That's great news. It can be really hard to debug these things. I've just spent a day trying to work out why an SPI peripheral wouldn't work. Sometimes we really are just fumbling around in the dark.
Thanks! I'm surprised at how much better the I2S microphone board is performing. I guess it's a much more modern bit of tech and the processing of the signal is a lot more advanced.
@@atomic14 I'm thinking about adding a microphone to an ESP32-CAM board, need to check which pins are free (there aren't many) to see if it's practical or not.
Yes, the ESP-CAM is a bit of a pain as they haven't left may pins open. I think you can free up some pins by disabling the flash card if you aren't using it and you can re-use the serial lines once you've programmed the board.
And to add insult to injury, with the SPH0645 there is a positive "DC offset" in the digital that is limiting the dynamic range of the linear pcm by 20%-30% in the positive side
This as well as the analog video (at ESP32 Audio Input Using I2S and Internal ADC - UA-cam) are gospel. They sure demonstrates some of the issues we've encountered with our sound reactive fork of WLED.
Great job on explaining this, I am a total noob but it kind of gives me a broad idea of how I should try doing RCA inputs or 3.5 jack input as im using it for the WLED in a car
You might want to add such 'peace of mind' power supply to your ebay page.. Even if as a bare PCB - people who might want one either already have parts to populate it or can get them easily.
At time 2'40", you have the GPIO35 wired as SCK (BCLK) which is clock output to the serial clock of the I2S microphone. However, on most (if not all) ESP32, GPIO35 is an input only pin. You code looks correct when using GPIO32, but the Dout should be on a pin other than GPIO32.
Hi atomic14, really really enjoying your videos and the work you've put into them. I'm trying to follow along with the projects and have downloaded the source code to play around with. I currently am using the INMP441 microphone connected to the ESP32 as per the wiring diagram on the github page. I have been able to get the esp32 to connect over wifi to stream the i2s data back. However, I am running into an issue with the quality of the audio received. I have been importing the audio into audacity with the settings - 16 bit signed PCM, 16000hz sampling rate and mono channel. While I am able to hear most of the high level features of the audio, the audio file is generally very distorted and has lots of hissing and popping noises in the background which is very different to what I've seen in your videos. Do you have any suggestions or advice on what I could potentially be getting wrong? Thanks
Hi Sean, Can you open up an issue on the GitHub repo and we can try and troubleshoot what you are seeing, If you can attach a sample of the audio you are getting that would be really useful. Thanks Chris
Hi there, this is Hassan, at 2:51, you shared the schematic diagram of the circuit, could you let me know which platform you used to make it on. I have a similar project, and I had to make a schematic of it. Unfortunately, I couldn't find any online tool where the mic module could be available. My project uses an SD card, and an esp32 as well, I hope to hear from you soon.
Great video. Thank you! Do you have the specs / schema for the PCB you created and had made for you? I'd be interested in taking a look and having one made so I can try to follow along directly. I'm new to this and interested in learning. Thank you very much!
Here you go - easyeda.com/chris_9044/esp32-audio-board With the INMP441 I'm not sure it's really needed as it seems to handle the noisy power supply pretty well.
Hi First of All thanks for the demo. I am trying to implement the same and I wanted to ask how are you taking care of the data that's coming as 2's compliment.
Great videos, they helped me a lot! Thank you. I am trying to use a INMP441 to build a guitar tuner but I cannot use the autocorrelation functions to do that. Anyone has ever built a Guitar Tuner with I2S and Esp32?
Nice video. One of the big advantage of i2s micro mems is the known value of the expected RMS level for 94dB @ 1000 Hz . So you do not really need to calibrate the microphone. I would like to know the diameter of the INMP1441, it would be good if it fit inside 1/2" tube.
My callipers says it's about 14.5mm (0.57inch) diameter. All the breakout boards that I've been able to find follow the same form factor. There is this later version of the microphone - the ICS43434 - and there are some breakout boards for it that are really tiny. Unfortunately, they only seem to be available shipped from the US - www.tindie.com/products/onehorse/ics43434-i2s-digital-microphone/
Thanks for the video very helpful, by chance i have question which of these sensors (mems or analog ones) is capable to use in such projects like beehive sound detection? any advice ..
Thanks for the video! I have been working on an audio project with the ESP32 and digital mics and have been having trouble getting anything to work. Do you have any tutorials on how to use your source code? I am not sure how to get it on to the ESP32. Thanks!
Hi Gian, I2S is very much based around stereo audio so you have a left and right channel with only one data line for the left and right. You need to tell devices if they are on the left or right channel otherwise they won't know when to send their data. Tieing the L/R line to 3v3 tells it that it should send its data when the left channel is requested.
Hi, is it possible to use an I2S microphone + ESP32 and stream the audio captured by the microphone to a PC or RP where it is recorded and analyzed later? Thx for y advise.
Thanks for the convincing demonstration that whenever possible I2S microphone is a better choice. However, it's not clear to me why the INMP441 is "hands down" better than the SPH0645. From the audio, they sound quite similar. Can you elaborate?
From what I read there is some weird timing incompatibility - it can be worked around, but it’s not ideal: hackaday.io/project/162059-street-sense/log/160705-new-i2s-microphone
@@atomic14 Ah, thanks! I thought the mis-alignment was the problem of the ESP32 I2S, but after reading your code on Github, I realized that the workaround is only needed for the SPH0645. Yes, that makes the INMP441 the preferred device.
Good spot - that's an error in the diagram. The linked GitHub repo uses the following pins: .bck_io_num = GPIO_NUM_32, .ws_io_num = GPIO_NUM_25, .data_out_num = I2S_PIN_NO_CHANGE, .data_in_num = GPIO_NUM_33
Hi there ! I'm facing a strange issue, the SPH0645 only works when I put WS to ground, I'm using an ESP32-S3 on a custom PCB and I used your tweak settings to make it work however the only way to get a valid output from the mic is to try putting WS to the ground multiple times after the startup... If I don't do that I get random and incoherent values. I'm really struggling to get around this problem, so any help would be welcome ^^
Tell me something , what interface did you use to capture the audio directly into the audacity software. Like the mic is connected to the esp32 and is there any plugin that directly sends the audio to the audacity ?? i would like to know that in detail .
Hi there, we stream the audio from the ESP32 to a server running on a laptop or desktop and save the audio to a file. That file can then be loaded into Audacity using the import raw audio feature. Code for the server should be in the repo here - github.com/atomic14/esp32_audio. I don't think there is any plugin that will let you send the audio directly to Audacity,
@@atomic14 Well i did not found the code in order to interface the i2s mic to the esp. I was specifically trying to look for an ino file but i did not found any . Could you guide me as to where is that code in that repo ( sorry if my question sounds stupid to you ) as i am not a very advanced programmer rather a noob but i'm good with hardware stuff .
@@TechInventorAman Hi Aman, the code in the demo repo is using platform.io for the IDE. There is a much simplified version here which will work with the Arduiono IDE - github.com/atomic14/ICS-43434-breakout-board
Hi mr atomic14, I faced this error: [E][WiFiClient.cpp:268] connect(): socket error on fd 48, errno: 104, "Connection reset by peer" , could you help me please!
Is it possible to use audio input (e.g. inmp441 i2s) or audio output (e.g. max98357A i2s) via a port expander? If yes how is it done, especially the pin config? Thanks for any advice.
1:00 the sensor is soldered on the bottom. What's the reason? avoid wind noise? avoid collecting dust? I put the sensor on top, because I think that's where the sound comes from.
MEMS microphones come in two different styles, top ported and bottom ported. Top ported versions have a hole in the top of the microphone for the sound to enter. Bottom ported have the hole in the bottom and you need to have a matching hole in the PCB to let the sound in. Both the INMP441 and the SPU0645 are bottom ported.
Great video! I'm planning to use esp32-cam for an IoT project. There's going to be live video and audio input to watch on smartphone. And there will be a motor and 2 sensors. Can esp32 handle these together? Or is there any other recommendations?
An esp32 can certainly handle all of that together. You may struggle with the number of available GPIO pins on the esp-cam boards. A lot of the pins are taken up by the camera board so you aren't left with many.
There's a couple of options, you can use the built-in ADCs - ua-cam.com/video/pPh3_ciEmzs/v-deo.html There are also some I2S ADC boards, but they seem to be quite unusual. The majority seem to be I2C. I did find this one though - www.sparkfun.com/products/retired/9365
@@atomic14 what about a decent library? On conventional Arduino there is an audio library that doesn't require a lot of setup... play, record, and not much more .
I'm in NZ so hard to get components. I can source the SPH0645 from Aussie. I am using the ESP32. Is it worth going down this path or should I be patient and order from further away!
@@atomic14 Thank you for your very fast response. I have been spending a fair bit of time searching. Frustrating when supply is the biggest issue! One board that is available in NZ is Pmod MIC3: MEMS Microphone with Adjustable Gain by Digilent. It appears to have what is needed but I cannot find anyone using it with an ESP32 just the Adruino. Worth a try? (I am newbie at this).
@@kellyrummins3338 You can also use the built-in ADCs they aren't really that bad for audio input provided you can give your microphones a good clean power supply.
Is there a way to use an external wire microphone but retain the i2s interface ? I want to make a wifi wireless headset compatible with pulseaudio I want one esp32 to have two audio output channels and one audio input channel for the microphone. But what chip can take signal from a normal microphone and turn that into a i2s signal ?
Hi there, In theory, this is definitely possible. there are a few I2S adc converter chips and if you google you will find some breakout boards. I have read a few forum posts with people struggling to get thingsto work consistently www.esp32.com/viewtopic.php?f=12&t=10749. There are also SPI based ADC converters which you could use instead of I2S. Depending on the board you find you will need a microphone pre-amp to boost the mic signal up to a sensible level.
Fairly close. One of the downsides with these mics is that they don't have a built in AGC. They do have great dynamic range - 24bits but using that full dynamic range comes with its own challenges. I've been looking at adding in a very simple AGC which hopefully I'll have a tutorial on soon.
thanks sir for posting these videos. I am using SPH0645 with sampling rate = 16k , bits per sample = 32, and variable buffer lengths and counts. but no matter what i set buffer lenght and count by recorded audio is FASTER . if i speak for 5 second recorded one is kind of 2 second long. Any comments on that
@@atomic14 thanks for replying. i am only using left channel and am selecting mono while loading raw in audacity. I think the culprit is size attribute in i2s_read() function , i.e the 3rd one. kindly put some light on it
@@chaitanyadas1814 If you look at the sample code attached to the video you can see that the 3rd argument is just the number of bytes you want to read from the I2S device. They are using that formula to try and make sure they read enough bytes to hold complete samples. To be honest I would ignore that formula as it's quite confusing and generally you want to read quite a few samples. If you are using 32 bits then each sample takes up 4 bytes.
I don't currently have any sample code for recording and playback on device. The sample code I currently have sends the audio to a PC running a small server. The audio is saved to file as raw samples so you need to use a tool like Audacity to load the samples and play them.
@@rajbirsingh4879 Yes, the code runs on your local machine. I think you want to record to the device and play back from there? You will be limited by the amount of memory so you will probably want to record to flash or SD card. Recording to flash is quite difficult as it's quite slow. If you have a device with PSRAM then you can record to memory without any problems. I don't have any code to show this at the moment though.
@@atomic14 Yes, actually I want to record the voice and want to hear what I am recording. I have an SD card adaptor. Please let me know how i can do that
Interested in ESP32 Audio: ua-cam.com/play/PL5vDt5AALlRfGVUv2x7riDMIOX34udtKD.html
Looking for all my ESP32 projects: ua-cam.com/play/PL5vDt5AALlRdN2KyL30l8j7kLCxhDUrNw.html
@Kairo Kabir instablaster ;)
however esp32s3 can't driver sph-0645 microphone sensor ! mybe the register address is different
Hello I have an Invensense Ics 43432 microphone how can I use it to calculate decibels values of sound ? Thank You.
Wow these videos are going to save me a lot of time. Thanks for doing these tests. I'm glad you also tested them without your filter.
this is a perfect conversion from information to knowledge.
Thanks a lot! I thought the INMP1441 I had bought was broken because it didn't work at all, but your explanation and your code made it work beautifully!
That's great news. It can be really hard to debug these things. I've just spent a day trying to work out why an SPI peripheral wouldn't work. Sometimes we really are just fumbling around in the dark.
Thanks, for a clear simple comparison between these and the analogue input.
Thanks! I'm surprised at how much better the I2S microphone board is performing. I guess it's a much more modern bit of tech and the processing of the signal is a lot more advanced.
@@atomic14 I'm thinking about adding a microphone to an ESP32-CAM board, need to check which pins are free (there aren't many) to see if it's practical or not.
Yes, the ESP-CAM is a bit of a pain as they haven't left may pins open. I think you can free up some pins by disabling the flash card if you aren't using it and you can re-use the serial lines once you've programmed the board.
If you can find 3 spare pins then you should be good - I know the ESP32-CAM board is pretty limited as they've used up a lot of the pins already.
And to add insult to injury, with the SPH0645 there is a positive "DC offset" in the digital that is limiting the dynamic range of the linear pcm by 20%-30% in the positive side
Anyone figure out why / a solution to this?
This as well as the analog video (at ESP32 Audio Input Using I2S and Internal ADC - UA-cam) are gospel. They sure demonstrates some of the issues we've encountered with our sound reactive fork of WLED.
Sound reactive WLED sounds really interesting! I'll have to check it out.
Thanks for sharing the audio clips. very useful to get the idea before purchase.
Great job on explaining this, I am a total noob but it kind of gives me a broad idea of how I should try doing RCA inputs or 3.5 jack input as im using it for the WLED in a car
You might want to add such 'peace of mind' power supply to your ebay page..
Even if as a bare PCB - people who might want one either already have parts to populate it or can get them easily.
Wow, great video. its very helpful for my examination project! Thanks a lot
Glad it was helpful! Hope the project went well.
really good, really helpful! Thanks!
At time 2'40", you have the GPIO35 wired as SCK (BCLK) which is clock output to the serial clock of the I2S microphone. However, on most (if not all) ESP32, GPIO35 is an input only pin. You code looks correct when using GPIO32, but the Dout should be on a pin other than GPIO32.
oooh - good spot! The diagram is wrong.
Thank you so much, this was so useful.
Hi atomic14, really really enjoying your videos and the work you've put into them. I'm trying to follow along with the projects and have downloaded the source code to play around with. I currently am using the INMP441 microphone connected to the ESP32 as per the wiring diagram on the github page. I have been able to get the esp32 to connect over wifi to stream the i2s data back. However, I am running into an issue with the quality of the audio received. I have been importing the audio into audacity with the settings - 16 bit signed PCM, 16000hz sampling rate and mono channel. While I am able to hear most of the high level features of the audio, the audio file is generally very distorted and has lots of hissing and popping noises in the background which is very different to what I've seen in your videos. Do you have any suggestions or advice on what I could potentially be getting wrong? Thanks
Hi Sean,
Can you open up an issue on the GitHub repo and we can try and troubleshoot what you are seeing, If you can attach a sample of the audio you are getting that would be really useful.
Thanks
Chris
Hi there, this is Hassan, at 2:51, you shared the schematic diagram of the circuit, could you let me know which platform you used to make it on. I have a similar project, and I had to make a schematic of it. Unfortunately, I couldn't find any online tool where the mic module could be available.
My project uses an SD card, and an esp32 as well, I hope to hear from you soon.
Great video. Thank you! Do you have the specs / schema for the PCB you created and had made for you? I'd be interested in taking a look and having one made so I can try to follow along directly. I'm new to this and interested in learning. Thank you very much!
Here you go - easyeda.com/chris_9044/esp32-audio-board
With the INMP441 I'm not sure it's really needed as it seems to handle the noisy power supply pretty well.
@@atomic14 Thank you for the reply. I greatly appreciate it!
Hi, I noticed that GND and VDD are not connected to anything in the circuit diagram. Are they supposed to be connect to something?
Hi
First of All thanks for the demo. I am trying to implement the same and I wanted to ask how are you taking care of the data that's coming as 2's compliment.
Thanks a lot. Helped me greatly.
Nice video! I'd be very interested in your choice of components for the power supply filtering. What values did you use?
really amazing video thank you very much! subbed :)
wow! what a BIG difference in audio. I hope youd have a project INMP441(mic) and output it in analog(esp32?) with agc.
I've been thinking about doing this for a while!
Great videos, they helped me a lot! Thank you. I am trying to use a INMP441 to build a guitar tuner but I cannot use the autocorrelation functions to do that. Anyone has ever built a Guitar Tuner with I2S and Esp32?
Could you please make a video on how to record voice commands and with esp8266 send the audio to raspberry pi over local wifi...please
Nice video. One of the big advantage of i2s micro mems is the known value of the expected RMS level for 94dB @ 1000 Hz . So you do not really need to calibrate the microphone. I would like to know the diameter of the INMP1441, it would be good if it fit inside 1/2" tube.
My callipers says it's about 14.5mm (0.57inch) diameter. All the breakout boards that I've been able to find follow the same form factor.
There is this later version of the microphone - the ICS43434 - and there are some breakout boards for it that are really tiny. Unfortunately, they only seem to be available shipped from the US - www.tindie.com/products/onehorse/ics43434-i2s-digital-microphone/
Thanks for the video very helpful, by chance i have question which of these sensors (mems or analog ones) is capable to use in such projects like beehive sound detection? any advice ..
Thanks for the video! I have been working on an audio project with the ESP32 and digital mics and have been having trouble getting anything to work. Do you have any tutorials on how to use your source code? I am not sure how to get it on to the ESP32. Thanks!
Would it be posibble to use a proper mic capsule (ie JLI-2555BXZ3-GP) somehow? Then transfer it via wi-fi like You did in one of Your other videos.
@ atomic14 may i know how to save the recorded audio from the inmp441 to the audacity?
I'm really having problems converting adc buffer or captured sound buffer to a playable .wav format.
How did u do it ?
Thanks in advance
Great video, look forward to use it in my projects, although I have a question, why do you connect the L/R pinout of the INMP441 to 3v3?
Hi Gian, I2S is very much based around stereo audio so you have a left and right channel with only one data line for the left and right. You need to tell devices if they are on the left or right channel otherwise they won't know when to send their data. Tieing the L/R line to 3v3 tells it that it should send its data when the left channel is requested.
Hi, is it possible to use an I2S microphone + ESP32 and stream the audio captured by the microphone to a PC or RP where it is recorded and analyzed later? Thx for y advise.
Thanks for the convincing demonstration that whenever possible I2S microphone is a better choice. However, it's not clear to me why the INMP441 is "hands down" better than the SPH0645. From the audio, they sound quite similar. Can you elaborate?
From what I read there is some weird timing incompatibility - it can be worked around, but it’s not ideal: hackaday.io/project/162059-street-sense/log/160705-new-i2s-microphone
@@atomic14 Ah, thanks! I thought the mis-alignment was the problem of the ESP32 I2S, but after reading your code on Github, I realized that the workaround is only needed for the SPH0645. Yes, that makes the INMP441 the preferred device.
I wonder how you managed to make the ESP32 output the clock signal on GPIO35 - it's input only…
Good spot - that's an error in the diagram. The linked GitHub repo uses the following pins:
.bck_io_num = GPIO_NUM_32,
.ws_io_num = GPIO_NUM_25,
.data_out_num = I2S_PIN_NO_CHANGE,
.data_in_num = GPIO_NUM_33
Can i read four INMP441 sound signals at the same time? I want to use esp32+4*inmp441 to make a voice location. Thank you
could you try out the Adafruit PDM Microphone which is digital but not I2S and not PWM?
Very very good
Hi there ! I'm facing a strange issue, the SPH0645 only works when I put WS to ground, I'm using an ESP32-S3 on a custom PCB and I used your tweak settings to make it work however the only way to get a valid output from the mic is to try putting WS to the ground multiple times after the startup...
If I don't do that I get random and incoherent values.
I'm really struggling to get around this problem, so any help would be welcome ^^
If you join the discord server you can share your schematic+code we can have a look and see if anything is obvious.discord.gg/PKrNGqN6
Do you know of any microphones compatible with the esp32 that can handle 120db +?
Tell me something , what interface did you use to capture the audio directly into the audacity software. Like the mic is connected to the esp32 and is there any plugin that directly sends the audio to the audacity ?? i would like to know that in detail .
Hi there, we stream the audio from the ESP32 to a server running on a laptop or desktop and save the audio to a file. That file can then be loaded into Audacity using the import raw audio feature. Code for the server should be in the repo here - github.com/atomic14/esp32_audio. I don't think there is any plugin that will let you send the audio directly to Audacity,
@@atomic14 Well i did not found the code in order to interface the i2s mic to the esp. I was specifically trying to look for an ino file but i did not found any . Could you guide me as to where is that code in that repo ( sorry if my question sounds stupid to you ) as i am not a very advanced programmer rather a noob but i'm good with hardware stuff .
@@TechInventorAman Hi Aman, the code in the demo repo is using platform.io for the IDE. There is a much simplified version here which will work with the Arduiono IDE - github.com/atomic14/ICS-43434-breakout-board
Hi mr atomic14, I faced this error: [E][WiFiClient.cpp:268] connect(): socket error on fd 48, errno: 104, "Connection reset by peer" , could you help me please!
Is it possible to use audio input (e.g. inmp441 i2s) or audio output (e.g. max98357A i2s) via a port expander? If yes how is it done, especially the pin config? Thanks for any advice.
please tell me can we use both to make a line pass for hearing aid solution
1:00 the sensor is soldered on the bottom. What's the reason? avoid wind noise? avoid collecting dust? I put the sensor on top, because I think that's where the sound comes from.
MEMS microphones come in two different styles, top ported and bottom ported. Top ported versions have a hole in the top of the microphone for the sound to enter. Bottom ported have the hole in the bottom and you need to have a matching hole in the PCB to let the sound in. Both the INMP441 and the SPU0645 are bottom ported.
@@atomic14 oh I see. Thank you.
how to pass the INMp441 to speaker directly ...is this possible
Great video! I'm planning to use esp32-cam for an IoT project. There's going to be live video and audio input to watch on smartphone. And there will be a motor and 2 sensors. Can esp32 handle these together? Or is there any other recommendations?
An esp32 can certainly handle all of that together. You may struggle with the number of available GPIO pins on the esp-cam boards. A lot of the pins are taken up by the camera board so you aren't left with many.
@@atomic14 Thank you so much for your attention to my question. I'll consider this.
@@seget96 There's a good guide here - randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/ if you aren't using the SDCard you'll get a few pins back.
@@atomic14 Wow I didn't know that! I appreciate it! Thanks a lot :)
Hello sir, please can i have the schematics of the filter? Thenko
Is there a breakout board that allows for a line-in instead of a microphone? So it can take audio from an analog source?
There's a couple of options, you can use the built-in ADCs - ua-cam.com/video/pPh3_ciEmzs/v-deo.html There are also some I2S ADC boards, but they seem to be quite unusual. The majority seem to be I2C. I did find this one though - www.sparkfun.com/products/retired/9365
@@atomic14 what about a decent library? On conventional Arduino there is an audio library that doesn't require a lot of setup... play, record, and not much more .
is the esp32 powerful enough to bandpass 300Hz-3KHz + DAC?
Hi Raffy, it should be yes - they are pretty powerful processors.
awesome ..
What is the PC software to Display and record the sound data?
audacity
YOU ARE THE BEST
Thanks!
Hey chis, I'm wondering if you can help me out with the server side?
If you raise an issue on the GitHub project I'll try and help. The server side is very basic - it just records raw audio to a file.
I'm in NZ so hard to get components. I can source the SPH0645 from Aussie. I am using the ESP32. Is it worth going down this path or should I be patient and order from further away!
I would go ahead and use the SPH0645.
@@atomic14 Thank you for your very fast response. I have been spending a fair bit of time searching. Frustrating when supply is the biggest issue! One board that is available in NZ is Pmod MIC3: MEMS Microphone with Adjustable Gain by Digilent. It appears to have what is needed but I cannot find anyone using it with an ESP32 just the Adruino. Worth a try? (I am newbie at this).
@@kellyrummins3338 That should work - it has an SPI interface which the ESP32 supports. The code you see for Arduino should work on the ESP32 as well.
@@atomic14 Fantastic. Thanks again so much. Your audio project videos have been immensely helpful.
@@kellyrummins3338 You can also use the built-in ADCs they aren't really that bad for audio input provided you can give your microphones a good clean power supply.
Is there a way to use an external wire microphone but retain the i2s interface ?
I want to make a wifi wireless headset compatible with pulseaudio
I want one esp32 to have two audio output channels and one audio input channel for the microphone.
But what chip can take signal from a normal microphone and turn that into a i2s signal ?
Hi there, In theory, this is definitely possible. there are a few I2S adc converter chips and if you google you will find some breakout boards. I have read a few forum posts with people struggling to get thingsto work consistently www.esp32.com/viewtopic.php?f=12&t=10749. There are also SPI based ADC converters which you could use instead of I2S. Depending on the board you find you will need a microphone pre-amp to boost the mic signal up to a sensible level.
any success, i want to INMp441 mic and stero out from esp32
How far the distance between your mouth (as sound source) to the mic?
Fairly close. One of the downsides with these mics is that they don't have a built in AGC. They do have great dynamic range - 24bits but using that full dynamic range comes with its own challenges. I've been looking at adding in a very simple AGC which hopefully I'll have a tutorial on soon.
thanks sir for posting these videos. I am using SPH0645 with sampling rate = 16k , bits per sample = 32, and variable buffer lengths and counts. but no matter what i set buffer lenght and count by recorded audio is FASTER . if i speak for 5 second recorded one is kind of 2 second long. Any comments on that
How are you loading the raw data? You could be importing it as stereo - which would cause it to double in speed.
@@atomic14 thanks for replying. i am only using left channel and am selecting mono while loading raw in audacity. I think the culprit is size attribute in i2s_read() function , i.e the 3rd one. kindly put some light on it
@@chaitanyadas1814 when you read the data in are you specifying 16 or 32 bits? In my code and convert the 32 bit data to 16 bits before using it.
((bits+8)/16)*SAMPLE_PER_CYCLE*4 , i mean this formula from the documentation . what are bits and sample_per_cycle variables in above formula
@@chaitanyadas1814 If you look at the sample code attached to the video you can see that the 3rd argument is just the number of bytes you want to read from the I2S device. They are using that formula to try and make sure they read enough bytes to hold complete samples. To be honest I would ignore that formula as it's quite confusing and generally you want to read quite a few samples. If you are using 32 bits then each sample takes up 4 bytes.
Thanx for the great video, I have an INMP441 mic, could you please how to record the sound the play after that
Hello, please help me how to play the recorded sound.
I don't currently have any sample code for recording and playback on device. The sample code I currently have sends the audio to a PC running a small server. The audio is saved to file as raw samples so you need to use a tool like Audacity to load the samples and play them.
@@atomic14 i think the server you are talking about is your personal one.
@@rajbirsingh4879 Yes, the code runs on your local machine. I think you want to record to the device and play back from there? You will be limited by the amount of memory so you will probably want to record to flash or SD card. Recording to flash is quite difficult as it's quite slow. If you have a device with PSRAM then you can record to memory without any problems. I don't have any code to show this at the moment though.
@@atomic14 Yes, actually I want to record the voice and want to hear what I am recording.
I have an SD card adaptor.
Please let me know how i can do that
Спасибо
can i use INMP441 even if it's not soldered?
Hi Achmad - I'm not sure what you mean - can you explain what you are trying to do in a bit more detail?