← Back to ideas

Redson Dev · Idea

IoTAdvancedAges 18+A weekend

Voice-controlled LED lamp with ESP32 + AI wake word

Published April 26, 2026

Say 'lamp on' and the light comes on — no Alexa, no cloud. The ESP32 listens locally with a tiny on-device wake-word model. Equal parts hardware, firmware and machine learning.

What you'll need

  • ESP32-S3 board with PSRAM (the S3 is required for the audio model)
  • INMP441 I2S microphone
  • WS2812 LED strip or single addressable LED
  • 5V power supply, breadboard, jumper wires
  • USB-C cable

Step-by-step

  1. 01

    Set up ESP-IDF or Arduino-ESP32

    Arduino is friendlier; ESP-IDF gives you the official esp-sr (speech recognition) library which is what we want. Install the latest IDF and confirm `idf.py --version`.

  2. 02

    Wire the microphone (I2S)

    INMP441: VDD→3.3V, GND→GND, SCK→GPIO 14, WS→GPIO 15, SD→GPIO 32, L/R→GND.

  3. 03

    Wire the LED

    WS2812 data pin → GPIO 5 through a 330Ω resistor. Power it from 5V, common ground with the ESP32.

  4. 04

    Flash the wake-word example

    Clone esp-skainet from Espressif. Build the 'wake_word_detect' example targeting esp32s3. It ships with 'Hi ESP' as the default wake word.

  5. 05

    Train your custom command

    Use Espressif's MultiNet command set or train your own with their online tool — pick 5 commands like 'lamp on', 'lamp off', 'red', 'blue', 'rainbow'.

  6. 06

    Wire commands to LED actions

    In the recognition callback, switch on the command ID and call the WS2812 driver to set the colour or turn off.

  7. 07

    Box it up

    3D-print a small case or hot-glue it into a mason jar with frosted tape. Power via USB-C.

Tips

  • The ESP32 (non-S3) doesn't have enough RAM for the speech model — don't waste a weekend learning that the hard way.
  • Wake-word detection runs continuously at ~30mA. Battery life is hours, not days — keep it plugged in.
#esp32#ai#voice#tinyml