You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the Inmp441Max98357a device, the audio input (microphone signal) is distorted, because each sample is sent twice (apparently, this is what the ESP32 API will do, when 16 bit resolution is requested).
To illustrate, I recorded the streamed signal while playing a loud 440 Hz tone through a PC speaker, the read the resulting WAV file in Audacity. Below are screenshots from Audacity, from the zoomed WAV signal, amplified by 6 dB for clarity.
This was compiled with platform Espressif 32 (4.2.0) for an "Espressif ESP32 Dev Module", framework framework-arduinoespressif32 @ 3.20002.220503 (2.0.2)
With the original code
With modified code, using 32 bit samples
The modified code is in my fork of the original code. I'm not a Github expert, I guess I'll have to figure out how to do a pull request ...
The text was updated successfully, but these errors were encountered:
The code in my fork has 2 changes compared to the original, which maybe I shouldn't have checked in together, but too late now:
a functional change to implement the duplicated 16-bit words as described above
a cosmetic change, making the definitions at the top of Inmp441Max98357a.hpp more consistent: all pin numbers etc. pertaining to the microphone I2S port start with MIC_, all pin numbers etc. pertaining to the speaker I2S port start with SPK_, and the config structs in Inmp441Max98357a::init() end with _mic or _spk, resp. -- just made it easier for me to wrap my head about what pertains to what
ProrokWielki
added a commit
to ProrokWielki/ESP32-Rhasspy-Satellite
that referenced
this issue
Mar 17, 2024
With the Inmp441Max98357a device, the audio input (microphone signal) is distorted, because each sample is sent twice (apparently, this is what the ESP32 API will do, when 16 bit resolution is requested).
To illustrate, I recorded the streamed signal while playing a loud 440 Hz tone through a PC speaker, the read the resulting WAV file in Audacity. Below are screenshots from Audacity, from the zoomed WAV signal, amplified by 6 dB for clarity.
This was compiled with platform Espressif 32 (4.2.0) for an "Espressif ESP32 Dev Module", framework framework-arduinoespressif32 @ 3.20002.220503 (2.0.2)
With the original code
With modified code, using 32 bit samples
The modified code is in my fork of the original code. I'm not a Github expert, I guess I'll have to figure out how to do a pull request ...
The text was updated successfully, but these errors were encountered: