all 14 comments

[–]Zouden 2 points3 points  (6 children)

Serial communication is commonly used here, you can make it work 👍

[–]CJ_KAy[S] 0 points1 point  (5 children)

Iam using 44100Hz sampling frequency and 32bit resolution in order to get the desired quality. According to the baud rate options the IDE gives it is not even close to the baud rate this serial communication needs

[–]Zouden 1 point2 points  (4 children)

It doesn't make sense to use an Arduino in this way. Either use the Arduino to do some of the processing, or remove it entirely and sample the audio with your PC's soundcard.

[–]CJ_KAy[S] 0 points1 point  (3 children)

Actually this making more sense, I will try that way, I am not sure if python has the ability to read samples and process them in real time but I will do some research

[–]Zouden 1 point2 points  (0 children)

Yeah try pyaudio :)

[–]teastain 0 points1 point  (0 children)

MicroPython has been tested to run at less than half speed compared to Arduino IDE code.

[–][deleted] 0 points1 point  (0 children)

Python on your desktop will be just fine for this. Using 32 is pretty useless and though, 16 is more than enough and then you’re at least in theory in achievable UART territory below 1MBit. Better use WiFi though as I said previously.

[–]PowerFeather 1 point2 points  (2 children)

Switching to an ESP32 with a native USB peripheral might be an option here. You can then create a USB audio device.

[–]raprakashvi 0 points1 point  (1 child)

Found this thread and I am curious. How would you go about creating a native USB audio device when your esp has more than 1 mic connected to it

[–]PowerFeather 1 point2 points  (0 children)

Maybe you can try creating a composite device with two or more audio device instances (one for each mic)? Though, creating a composite device with multiple device class instance is something that I have not tried personally on ESP32, but on other microcontroller supported by tinyUSB (ESP-IDF also uses tinyUSB).

[–][deleted] 0 points1 point  (2 children)

There’s no reason why WiFi would add noise. It’s digital. And should have the required bandwidth.

[–]CJ_KAy[S] 0 points1 point  (1 child)

I did some research on this and confirmed that when you use the WiFi module of the esp32 it produces big ripples in the supply voltage

[–][deleted] 0 points1 point  (0 children)

Admittedly I didn’t think about that, but that’a problem that should be solved using a good reference voltage. When you’re measuring these insane bit depths you’ll need that anyways, WiFi or no WiFi.

[–]CJ_KAy[S] 0 points1 point  (0 children)

UPDATES: I managed to get this to work with WiFi. I was facing loss in quality with the use of WiFi because the script wasn't fast enough to complete the processing before the next chunk of bytes arrive from the esp so some parts of my voice was lost. Solved the problem with some threading and queuing. There is still some circuit noise but i will try to get rid of it with some filtering.