voicute/onnx-wakeword
Open-source, fully offline wake word / keyword spotting (KWS) inference engine — ONNX/TFLite <250KB, multi-keyword, multilingual. Train a custom wake word online with auto hard-negative mining; deploy on ESP32 / Raspberry Pi / Android / Web / Windows / macOS / Linux / Home Assistant — runs on any ONNX/TFLite-capable device.
Featured achievements
The project's latest awards
#1 Repository of the week
#1 Repository of the week
#1 Repository of the week
Voicute — Offline Keyword Spotting & Wake Word Engine
Keyword Spotting · Wake Word · KWS · ONNX · Edge AI · ESP32 · Android · Offline · Open Source
100% offline · Model < 130KB · No cloud dependency · ESP32 / Android / Python / Web
Voicute is an open-source, cross-platform inference engine for custom keyword spotting and wake word detection. Bring your own ONNX model — or generate one online — and run fully offline on ESP32, Android, Web, or desktop.
Quick Links
| Platform | Directory | Entry Point |
|---|---|---|
| Web | web/ | wakeword.js → VoicuteWakeWord.create() |
| Python | python/ | wakeword_engine.py → WakeWordEngine() |
| Android | android/ | WakeWordEngine.java |
| ESP32 | esp32/ | ESP-IDF component |
Features
- Sub-130KB models — 25K parameters, fits ESP32 INT8 flash
- Multi-keyword — detect 2–10+ keywords with a single model
- Multi-language — Chinese, English, and 150+ languages via custom training
- 5-layer anti-false-trigger — consecutive frames, peak/background ratio, cooldown, burst detection, energy jump
- ZIP packaging — distribute model + config as a single file
Getting a Model
Online (recommended)
Go to voicute.com, type your keyword, get an ONNX model in minutes.
Train yourself
Any KWS framework that exports ONNX works:
Model files
You need two files:
| File | Purpose |
|---|---|
melspectrogram.onnx | Audio → mel spectrogram (provided in this repo) |
your_model.onnx | The keyword model (train or generate) |
Plus a model_info.json:
{
"model_type": "multi_keyword",
"keywords": ["Hey Friday"],
"model_file": "hey_friday.onnx",
"mel_time": 98,
"cons_frames": 3,
"n_mels": 32
}
Multi-keyword:
{
"model_type": "multi_keyword",
"keywords": ["turn on light", "turn off light", "volume up"],
"model_file": "commands.onnx",
"mel_time": 98,
"cons_frames": 3,
"n_mels": 32
}
Usage
Web
Python
pip install onnxruntime numpy pyaudio
from wakeword_engine import WakeWordEngine
engine = WakeWordEngine()
engine.load('models/model_info.json', 'models/melspectrogram.onnx')
engine.set_L1(True)
engine.start(lambda word, prob, info: print(f'Detected: {word}'))
Android
WakeWordEngine engine = new WakeWordEngine(context);
engine.load("model_info.json", "melspectrogram.onnx");
DetectionResult result = engine.process(audioChunk);
Anti-False-Trigger Layers
5 independent layers. Enable progressively:
| Layer | Default | Purpose |
|---|---|---|
| L1 | ON | Consecutive frames — filters transient clicks/noise |
| L3 | OFF | 1.5s cooldown — prevents duplicate triggers |
| L5 | OFF | Energy jump — blocks video/music playback |
| L2 | OFF | Peak/background ratio — prevents silence hallucination |
| L4 | OFF | Burst detection — blocks audio feedback loops |
Recommended: Start with L1 only. Add L3 if double-triggering. Add L5 for noisy environments. L2/L4 rarely needed since v9.3.
Repository Structure
onnx-wakeword/
├── android/ # Android (Java, ONNX Runtime)
├── web/ # Web (JavaScript, ONNX Runtime Web)
├── python/ # Linux / Windows / macOS (Python)
├── esp32/ # ESP32-S3/P4 (ESP-IDF)
└── models/ # Demo models
Version
v9.3 (2026-06) — Multi-keyword support, English wake words, false-trigger improvements.
See models/README.md for model changelog.
Similar Projects
Discover other similar projects and AI models.
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.
Open source, local, and self-hosted Amazon Echo/Google Home competitive Voice Assistant alternative
Ultralytics YOLOv5 in PyTorch for object detection, instance segmentation, classification, training, and export.
GPT-2 Test the whole generation capabilities here: https://transformer.huggingface.co/doc/gpt2-large Pretrained model on English language using a causal language modeling (CLM) objective. It was introduced in this paper(https://d4mucfpksywv.cloudfro...
ESPHome is a system to control your ESP32, ESP8266, BK72xx, RP2040 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Turn any Android device into a beautiful, dedicated Home Assistant kiosk. Purpose-built for Home Assistant from the ground up.