An ESP32-S3 based wake word detection system using Espressif's ESP-SR framework. Features voice control with animated face display feedback and supports both I2S digital and analog microphones.
- Wake Word Detection: Activate with "Hi ESP" command
- Voice Commands: Control lights and fans with natural language
- Animated Display: OLED display with expressive face animations
- Dual Microphone Support: I2S digital or analog microphone options
- FreeRTOS Multi-Core: Optimized task distribution across both cores
- ESP32-S3-DevKitC-1-N16R8 (16MB Flash, 8MB PSRAM)
- OLED Display (I2C, 128x64)
- Microphone Options:
- I2S Digital: INMP441, ICS-43434, or SPH0645
- Analog: MAX9814 or similar with gain control
- Platform: ESP32 Arduino (Custom platform with ESP-SR support)
- Libraries:
- U8g2 (OLED Graphics)
- ESP-SR (Speech Recognition)
- ESP-Skainet (Wake Word Models)
-
Install PlatformIO (VSCode Extension or CLI)
-
Clone the repository:
git clone https://github.com/jahrulnr/ESP32-WakeWord.git cd ESP32-WakeWord -
Configure hardware settings in
include/app_config.h:// Select microphone type #define MIC_TYPE MIC_TYPE_I2S // or MIC_TYPE_ANALOG // Configure pins according to your wiring #define MIC_SCK GPIO_NUM_41 // I2S: SCK #define MIC_WS GPIO_NUM_42 // I2S: WS #define MIC_DIN GPIO_NUM_2 // I2S: SD // Or for analog microphone #define MIC_OUT GPIO_NUM_4 // Analog: Output #define MIC_GAIN GPIO_NUM_38 // Analog: Gain
-
Build and upload:
pio run -t upload
-
Wake Word:
- Say "Hi ESP" to activate command mode
-
Light Control:
"Turn on the light" / "Switch on the light" "Turn off the light" / "Switch off the light" / "Go dark" -
Fan Control:
"Start fan" "Stop fan"
src/
├── main.cpp # Entry point
├── boot/ # System initialization
│ ├── setup.cpp # Hardware setup sequence
│ └── constants.h # Voice commands & constants
├── app/ # Application logic
│ ├── tasks/ # FreeRTOS tasks
│ ├── callback/ # ESP-SR callbacks
│ └── display/ # Display functions
lib/ # Custom libraries
├── Display/ # Display abstraction
├── FaceDisplay/ # Animated face system
├── Microphone/ # Microphone interfaces
└── Notification/ # Inter-task communication
-
Core 0: Speech recognition processing
- Priority 8
- 4KB stack
- Handles ESP-SR system and audio processing
-
Core 1: Display and animations
- Priority 19
- 4KB stack
- Manages UI updates and face animations
- Custom partition table (
hiesp.csv) - 8.9MB dedicated to model storage
- PSRAM optimization for ESP32-S3
For detailed instructions on building, packaging, and flashing ESP-SR models, see the ESP-SR Model Management Guide. The guide includes:
- Model structure and organization
- Build and flash instructions
- Pre-built configurations
- Troubleshooting common model issues
- ESP-SR and I2S integration tips
-
Speech Recognition Issues
- Verify 16kHz sample rate configuration
- Check microphone signal levels
- Monitor heap usage with serial output
-
Build Errors
- Clean build:
pio run -t clean - Verify ESP-SR platform compatibility
- Check PSRAM configuration
- Clean build:
-
Display Problems
- Verify I2C pins in
app_config.h - Check OLED address/configuration
- Monitor display task stack usage
- Verify I2C pins in
This project is licensed under the MIT License - see the LICENSE file for details.
- ESP-SR Framework by Espressif
- U8g2 Library
- Original face animations based on ESP32-Eyes