Log in

Building My Own ESP32 Voice Assistant – Part 2: Testing the Microphone

B By Baran Can Aydın · 4 min · 2026-10-31

Building My Own ESP32 Voice Assistant – Part 2: Testing the Microphone

This is part 2 of an ongoing series in which I build my own ESP32 voice assistant. I add new parts as the components arrive and the project moves forward.

Türkçe versiyonu

In Part 1 I planned the project and printed the case. The amplifier, the speaker and the LED strip were still in the mail. While waiting, I decided to run a first test with the two parts I already had, the ESP32 and the INMP441 microphone: does the microphone actually pick up sound?

Wiring: no soldering, on a breadboard

Before soldering anything I wanted to be sure everything worked. So for now I connected the microphone on a breadboard with jumper wires.

  • SCK: GPIO25
  • WS: GPIO26
  • SD: GPIO33
  • L/R: GND (left channel)
  • VDD: 3V3
  • GND: GND

Careful: the INMP441 runs on 3.3 V. Do not connect VDD to 5 V.

The test circuit: the ESP32 sits between two small breadboards and the INMP441 is connected with jumper wires. The board's red power light is on.

ESP32 and INMP441 test circuit on a breadboard

Test firmware

For the test I wrote a small ESPHome configuration that only uses the microphone (mic-test.yaml). It tests two things:

  1. Sound level: the sound_level sensor measures the microphone signal every second and reports it in dB.
  2. Wake word: micro_wake_word listens for "Hey Jarvis" directly on the ESP32.

This is the microphone part:

i2s_audio:
  - id: i2s_in
    i2s_lrclk_pin: GPIO26
    i2s_bclk_pin: GPIO25

microphone:
  - platform: i2s_audio
    id: mic
    i2s_audio_id: i2s_in
    adc_type: external
    i2s_din_pin: GPIO33
    channel: left
    bits_per_sample: 32bit
    sample_rate: 16000

Flashing: the problems I hit

I compiled the firmware on my Mac with ESPHome (2026.10.0) and flashed it over USB. Not everything worked the first time:

  • The board did not show up. The first time I plugged it in, the Mac did not see the ESP32 at all. Once it was connected properly it showed up as /dev/cu.usbserial-0001 (CP2102 USB chip).
  • Flashing stopped halfway. By default ESPHome flashes at a high speed (460800 baud), and the USB connection dropped for a moment. At a lower speed (115200 baud) it finished without problems. It took about a minute.
  • No sound values in the log. The sensor worked, but the new ESPHome version did not write its values to the log. After adding an on_value log line to the sensor, values started coming in every second:
    rms:
      name: "Mikrofon Ortalama Seviye"   # "Microphone average level"
      on_value:
        - logger.log:
            format: "Ses seviyesi (RMS): %.1f dB"   # "Sound level (RMS)"
            args: ["x"]
    

My configuration uses Turkish names and log messages, so I added translations as comments.

Result: the microphone and "Hey Jarvis" work 🎉

A few seconds after boot the ESP32 connected to Wi-Fi and the sound level values started coming in:

Live sound level values in the serial monitor

The values are in dBFS: 0 dB is the loudest level the microphone can capture, and the more negative the number, the quieter the room. During the test the values moved between −51 dB and −34 dB. So the microphone picks up the sounds in the room, and the value changes when the sound changes. Getting this result on a breadboard, without any soldering, felt good.

"Hey Jarvis" detected

Next came the exciting test. I said "Hey Jarvis" to the microphone, and the ESP32 detected it on its own, without asking any server:

The "Hey Jarvis" detection line in the serial monitor

[D][micro_wake_word]: Detected 'Hey Jarvis' with sliding average probability is 0.97 and max probability is 0.98
[D][main]: Uyandırma kelimesi algılandı: Hey Jarvis    ← "Wake word detected"

The model needs a probability of at least 0.97 to accept the wake word. My voice reached an average of 0.97 and a maximum of 0.98, so it passed. Even with the microphone on a breadboard, without soldering, the wake word works.

Case design: ImpatientMaker (a remix of JakeB's "Voice Assist Puck"), CC BY-NC 4.0. ESPHome code: impatientmaker/esphome-voice-assist (MIT). Full credits in Part 1.

Next step

Without waiting for the speaker, I connected the device to Home Assistant and tried the first voice command. It did not go as planned: Part 3: Connecting to Home Assistant (and Freezing the Raspberry Pi)

What's next?

The project is still going: connecting the amplifier and the speaker, soldering, the LED ring and the final assembly come in the next parts.

Parts of the series

📘 The whole build is also on Instructables as a 10-step guide: DIY ESP32 Voice Assistant for Home Assistant With a Custom Wake Word

AI Automationn8nBusiness
Share:
← Back to Blog