Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

wakeforge

wakeforge is a research framework for wake-word detection. It implements architectures, losses, and featurizers from the published wake-word literature, so you can reproduce a paper's result or compare methods side by side. Some included architectures exist to reproduce a published result, not because they are the best default — the per-architecture pages under docs/reference/ say which is which. Train, evaluate, and export lightweight on-device detectors that run anywhere from an ESP32 to a GPU server. Every component exports to ONNX; production inference requires only onnxruntime and numpy — no PyTorch at runtime.

An easy training run is not the same thing as a good detector. Loss going down and a quickstart command exiting 0 prove the pipeline works, not that the result is safe to ship — see docs/guides/expectations.md for what a deployable wake word actually looks like in false-accept and false-reject numbers, and how much data each tier needs to get there.

The first measured numbers show why. The first two models that wakeforge trained scored between 2397 and 5120 false accepts per hour on speech, noise and music at threshold 0.5, against a bar of 1. They accepted 70 % of the near-miss phrases, against a bar of 5 %. The training negatives were the cause. The rows, the commands and the cause are in docs/guides/expectations.md.

What is a wake word?

A short phrase ("hey jarvis", "computer", "alexa") that a device listens for continuously. When detected, downstream STT/NLU runs. A useful detector must run on tiny hardware (sub-100 KB, <10 % CPU, no internet), tolerate noise and distance, almost never false-fire, and trigger reliably when spoken. wakeforge is the toolchain that builds such a detector from a single phrase — synthesise data, train, evaluate, export, deploy. What counts as "almost never" and "reliably" in numbers is in docs/guides/expectations.md, not repeated here.

Who is this for?

You are… Start here
Hobbyist waking a Pi with your own phrase docs/getting_started/quickstart.md — ONNX in 5 minutes
Embedded engineer shipping to ESP32 / MCU docs/guides/embedded.md
Voice-assistant integrator (OVOS, Rhasspy, …) docs/guides/inference.md
ML researcher comparing architectures / losses docs/guides/search.md, docs/reference/losses.md, docs/research/rppl.md
New to ML entirely docs/quickstart-kaggle.md — step-by-step guide; runs free on Kaggle / Colab

Highlights

  • Single-string-to-ONNX quickstart — train_from_wakeword("hey jarvis", out) produces a deployable model.
  • 11 built-in featurizers (+ enrichment wrappers) × 15 classifier heads × 15 losses — a real research surface.
  • Pretrained WakeHuBERT featurizer — a 0.64M-parameter streaming extractor distilled from HuBERT-base (128-d at 50 fps, float32 and int8), downloaded from TigreGotico/wakehubert-tiny with --tier wakehubert or --featurizer-type wakehubert. A GRU head trained on 900 synthetic "alexa" clips detected 95% (95% interval 92–97) of the real speakers in the Picovoice benchmark at a threshold set for 0.5 false activations per hour (0.31 measured on 6.5 h of held-out streams), and 94 / 85 / 56% in babble at 10 / 5 / 0 dB, in a single run. Other published extractors (other architectures, 256-d outputs, WavLM and XEUS teachers) can be selected by name for comparison. Every training path takes a featurizer name — every head (--arch gru, bigru, cnn, ...), the wakehubert and wakehubert-bigru tiers, the quickstart, grid and genetic search, multi-stage and infinite training — and computes its features once per clip. Exported heads name the featurizer and its revision, so inference needs only the head. See Use a pretrained WakeHuBERT featurizer and notebooks/nb12_wakehubert.ipynb.
  • Genetic + Bayesian HP search with island-model parallelism, adaptive mutation, two-stage refinement.
  • Synthetic datagen — TTS + pure-ONNX voice conversion (voiceclonnx) to bootstrap a dataset from zero recordings.
  • Hard-negative mining and infinite training for industrial-scale negative pools.
  • ONNX-first: featurizer and head export cleanly; no CUDA-only kernels.
  • Hardware tiers from esp32_nano (sub-1 KB int8) to hubert_medium.

Honest trade-offs

  • CPU training works for small tiers; a mid-range GPU is the best UX for larger ones.
  • Synthetic data is great for smoke-testing — production still needs real far-field recordings.
  • ONNX-export is mandatory; non-traceable components (custom CUDA kernels, dynamic control flow) are out of scope. See docs/internals/known_issues.md.
  • SSL featurizers (HuBERT, Wav2Vec2-BERT) are used as pre-exported ONNX and held frozen during downstream training — guarantees train/inference parity but limits adaptation.

Install

# Published package (import name stays ww_trainer):
pip install --pre "wakeforge[datagen,torchcodec]"

For development, clone the repo and install it editable instead:

# Core library + tests
uv pip install -e ".[dev]"

# Quickstart / datagen needs TTS plugins + HF datasets + an audio codec:
uv pip install -e ".[dev,datagen,torchcodec]"

Optional extras (sweep, transformers, mlflow, datagen, vc, mic, viz, markov, ocsvm, torchcodec) — see docs/faq.md.

A default quickstart run needs ≈ 6–8 GB disk and ~5 GB download (or ~1.5 GB with --no-augmentation-data). Voice cloning via --vc-refs adds the per-engine ONNX weights downloaded on first use from the HuggingFace Hub (size varies by voiceclonnx engine). Full per-dataset budget: docs/getting_started/requirements.md.

60-second quickstart

ww_trainer-quickstart --wake-word "hey jarvis" --output-dir ./hey_jarvis

Or in Python:

from ww_trainer.quickstart import train_from_wakeword
result = train_from_wakeword("hey jarvis", "./hey_jarvis",
                             tier="small", epochs=50)
print(result.best_onnx_path, result.metrics)

Output: best_f1_featurizer.onnx + best_f1.onnx under ./hey_jarvis/model/. Load both with OnnxWakeWordInferencer — docs/guides/inference.md.

Documentation

Everything lives in docs/. Start with:

Contributing

Issues and pull requests welcome on the dev branch. Tests live in test/; run with uv run pytest.

Citation

@software{wakeforge,
  title  = {wakeforge: a research framework for on-device wake-word detection},
  author = {TigreGotico contributors},
  year   = {2026},
  url    = {https://github.com/TigreGotico/wakeforge},
  note   = {Funded by NGI0 Commons Fund / NLnet, grant 101135429}
}

Credits

Developed by TigreGótico for OpenVoiceOS.

NGI0 Commons Fund

This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429.


License

Apache 2.0

Metadata

Release files for wakeforge 0.15.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wakeforge 0.15.0a1
File Size Uploaded Provenance Actions
wakeforge-0.15.0a1.tar.gz 343.2 kB Without provenance Details for wakeforge-0.15.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wakeforge 0.15.0a1
File Interpreter ABI Platform Actions
wakeforge-0.15.0a1-py3-none-any.whl Python 3 none any Details for wakeforge-0.15.0a1-py3-none-any.whl

Total release size: 590.7 kB

Release files / wakeforge-0.15.0a1.tar.gz

Download URL wakeforge-0.15.0a1.tar.gz
Size 343.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3d865a2115df27f3c91c0d6a8a32f84c4aed869fdc752dd83f4b9827fc95c7b4
BLAKE2b-256 checksum
How to use checksums
b061dcd227ccef59f2f4fe198edb2f488187dbb3b106df83e9f77a5a97fc49ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / wakeforge-0.15.0a1-py3-none-any.whl

Download URL wakeforge-0.15.0a1-py3-none-any.whl
Size 247.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd16987537a4c9d6a5f61387399b2e6e5f6857ab071e9b520829deb7b43c6f18
BLAKE2b-256 checksum
How to use checksums
e336975a33ca5c57813e7117671b9bd7a8c1ff15e839d7d2c36a6b3efbcbf07e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for wakeforge 0.15.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page