Train a wake word with your own voice.
WakeTorch is a command-line tool that records your voice, trains a small model and exports it to ONNX. It runs on your machine and works in any language.
- Apache-2.0
- Python 3.10+
- v0.1.0
- macOS
- Windows
- Linux
$ waketorch

What is WakeTorch?
A wake word is the phrase that wakes a voice assistant, like “Hey Google”. WakeTorch lets you make your own: pick any phrase, in any language, and train a model that listens for it.
Instead of notebooks, cloud consoles or synthetic voices, you get a training and testing interface in your terminal. You record or upload your voice, WakeTorch trains the model and shows the results, you try it live with your microphone, and you export a small ONNX file with a ready-to-run code example.
- Your own recordings
- The model learns from clips of you saying the phrase, in whatever language you speak.
- Guided in the terminal
- The CLI takes you from project setup to export. You don’t write code to get a working model.
- Runs locally
- Training and inference happen on your machine. No account, no upload.
- A 1.3 MB ONNX file
- Runs on CPU. About 2 ms per check on an Apple M2.
On an Apple M2, one CPU thread checks the audio in about 2 ms and uses roughly 8% of a core while listening. Measured with tests/onnx_test.py. Results on your hardware will vary.
How it works
- Create a project and add your audio. Record or upload 30–50 clips of your wake word, some negatives (similar-sounding words) and a few minutes of background noise.
- Train. 2000 steps is a good starting point. A built-in device check recommends settings for your hardware.
- Test. Check the results and the training curve, then speak to your microphone and see how the model reacts.
- Export. Get your
.onnxfile and a ready-to-run example for using it in your own program.
Install
You need Python 3.10 or newer (3.12 recommended), and a microphone if you want to record directly.
macOS and Linux
$ git clone https://github.com/alejandrolopezdata/waketorch.git
$ cd waketorch
$ chmod +x install.sh
$ ./install.sh
# open a new terminal, then:
$ waketorch
Windows (Command Prompt)
git clone https://github.com/alejandrolopezdata/waketorch.git
cd waketorch
install.bat
REM open a new terminal, then:
waketorchNo git?
Download the ZIP from GitHub (Code, then Download ZIP), unzip it and run the installer from that folder. On Windows you can also double-click install.bat.
WakeTorch is free software under the Apache-2.0 license.
How the model works
Follow the audio from the microphone to a detection: the sliding audio window, the preprocessing that turns sound into features, the network, and the threshold logic that decides when your wake word was said.
Documentation
One page per source file, covering the guided CLI and the model package. Each page explains what the file does and how it connects to the rest. To read the code itself, browse the repository.
The guided CLI (cli/), 13 files
- __main__.pyEntry point that starts the CLI.
- main.pyMain menu and overall flow of the guided interface.
- screens.pyThe individual screens: project, record, train, results and test.
- guide.pyIn-app guidance and tips shown while you work.
- ui.pyShared look and feel: colors, panels and messages.
- charts.pyDraws the training loss curve in the terminal.
- cover.pyThe WakeTorch logo and start screen.
- picker.pyInteractive menus and selection lists.
- runner.pyLaunches training and other long tasks from the CLI.
- data_tools.pyTools to import, check and organize your audio.
- device_store.pyRemembers your computer check and recommended settings.
- examples.pyBuilds the ready-to-run code example for your model.
- versions.pyKeeps track of each trained model version.
The model package (src/wakeforge/), 12 files
- audio.pyLoads, resamples and prepares audio clips.
- window.pyCuts audio into the fixed-length windows the model listens to.
- features.pyTurns audio into the features the network reads.
- augment.pyMixes in noise and variations to make training robust.
- data.pyBuilds the training and validation datasets.
- model.pyThe neural network architecture.
- train.pyThe training loop.
- auto_statistics.pyComputes dataset statistics used to choose settings automatically.
- export.pyExports the trained model to ONNX.
- modelfile.pyReads and writes the model file and its metadata.
- config.pyLoads settings from the configuration file.
- projects.pyCreates and manages projects and their folders.
FAQ
Can I train a wake word in any language?
Yes. WakeTorch learns from your own recordings, so it works with any phrase you can say, in any language.
Do I need a GPU or the cloud?
No cloud. Training runs on your computer. An NVIDIA GPU or Apple Silicon makes it faster, and CPU-only works but is slower. Running the exported model only needs a CPU.
How many recordings do I need?
A good starting point is 30 to 50 clips of your wake word, some negatives (similar-sounding words) and a few minutes of background noise.
What do I get at the end?
A single .onnx file, plus a ready-to-run Python example to use it in your own program.
Is it production-ready?
Not yet. WakeTorch is version 0.1.0 and still in development. Test the model against your own audio before relying on it.