Custom OpenWakeWord training pipeline for generating wake word models compatible with HAwake Android.
git clone https://github.com/IT-BAER/hawake-wakeword.git; cd hawake-wakeword; .\install.ps1git clone https://github.com/IT-BAER/hawake-wakeword.git && cd hawake-wakeword && install.batgit clone https://github.com/IT-BAER/hawake-wakeword.git && cd hawake-wakeword && chmod +x install.sh && ./install.shThe setup script automatically:
- Creates a virtual environment
- Detects GPU and verifies CUDA kernel compatibility
- Installs appropriate PyTorch version (GPU or CPU)
- Installs all dependencies
- Downloads Room Impulse Responses for audio augmentation
- Downloads background audio data (~500MB–1GB) for training
- Launches the WebUI at http://localhost:8501
Note: First-time setup downloads ~1-2 GB of required training data and may take 10-20 minutes.
Optional: For best training quality, download the full feature file (~16GB) separately:
curl -L -o openwakeword_features_ACAV100M_2000_hrs_16bit.npy https://huggingface.co/datasets/davidscripka/openwakeword_features/resolve/main/openwakeword_features_ACAV100M_2000_hrs_16bit.npyOr run the install/download with the flag enabled:
HAWAKE_DOWNLOAD_LARGE_FEATURES=1 ./install.sh
.\uninstall.ps1uninstall.bat./uninstall.sh| Flag | Description |
|---|---|
--full |
Also remove downloaded TTS models (~200MB) |
--keep-venv |
Keep the virtual environment |
-y |
Skip confirmation prompts |
Example full cleanup:
./uninstall.sh --full -y- Streamlit WebUI - Easy-to-use interface for training custom wake words
- ONNX Opset 11 - Default opset for Android 8+ compatibility (selectable in WebUI)
- Piper TTS - High-quality synthetic voice generation
- Auto-Patching - Automatic IR version and attribute fixes for ONNX Runtime 1.14.0
- Python 3.11+ (Linux/WSL: use 3.11; Python 3.12 lacks piper-phonemize manylinux wheels and requires a source build)
- CUDA (optional, for GPU acceleration)
- ~10GB disk space (training data + models)
If you prefer manual installation:
git clone https://github.com/IT-BAER/hawake-wakeword.git
cd hawake-wakeword
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r requirements.txtpython download_data.py # Background audio (AudioSet, FMA)
python download_rirs.py # Room impulse responses# Windows
.\run_webui.ps1
# Or directly
streamlit run app.py- Enter your wake word (e.g., "hey jarvis")
- Click Generate Preview to hear pronunciation
- Adjust spelling if needed for correct pronunciation
- Click Start Training
- Download the resulting
.onnxmodel
| Parameter | Default | Description |
|---|---|---|
| Target Opset | 11 | ONNX opset version (11 required for HAwake) |
| Number of Examples | 5000 | Synthetic training samples |
| Training Steps | 5000 | Model training iterations |
| False Activation Penalty | 1500 | Reduces false positives |
For advanced users:
python train_local.pyEdit the file to configure:
target_word- Your wake wordnumber_of_examples- Training sample countnumber_of_training_steps- Training iterations
After training, copy your model to HAwake:
# Copy to HAwake Android assets
cp my_model/my_wake_word.onnx /path/to/hawake-android/app/src/main/assets/Or upload via the HAwake app's "Manage Wake Words" dialog.
Models are exported with:
- Selected Opset (default 11) - Best Android 8+ compatibility
- IR Version 7 - Required for ONNX Runtime 1.14.0
- No
allowzero- Attribute removed from Reshape nodes
Verify with:
python check_opset.py my_model.onnx├── app.py # Streamlit WebUI
├── train_local.py # CLI training script
├── check_opset.py # ONNX version checker
├── convert_models.py # Opset conversion utility
├── merge_models.py # Merge embedding + classifier
├── openwakeword/ # OpenWakeWord library (modified)
│ └── openwakeword/
│ ├── train.py # Training logic
│ └── resources/
│ └── models/ # Base feature extraction models
└── piper-sample-generator/ # TTS for synthetic audio
| Issue | Solution |
|---|---|
| GPU detected but "no kernel image" | Very new GPU (e.g., RTX 50 series). Use "Force CPU Mode" checkbox in WebUI |
| Training fails on GPU | Enable "Force CPU Mode" in WebUI sidebar |
| CUDA not available | Install NVIDIA drivers or use CPU mode |
| Wrong GPU detected | Set CUDA_VISIBLE_DEVICES=0 environment variable |
The WebUI has a "Force CPU Mode" checkbox under Hardware settings that lets you disable GPU even if one is detected. This is useful for:
- Very new GPUs that don't have PyTorch kernels yet
- GPUs with insufficient memory
- Troubleshooting CUDA issues
| Issue | Solution |
|---|---|
| Model crashes on Android | Run check_opset.py - must be Opset 11 |
| TTS sounds wrong | Adjust spelling phonetically |
| Low detection accuracy | Increase training examples to 10000+ |
- OpenWakeWord - Original project
- Piper - TTS engine
- ONNX Runtime - Model inference
Apache 2.0 - See LICENSE for details.