sentis-openwakeword

OpenWakeWord wake-word detection converted to Unity Inference Engine (Sentis) FP16.

Files

melspectrogram_fp16.sentis      # shared mel front end
embedding_model_fp16.sentis     # shared 96-dim embedding model
WakeWord/                       # per-word classifier heads (alexa, jarvis, Ronaldo)
OpenWakeWord.cs                 # self-contained Unity Sentis inference

⚠️ Wake-word sample models

The bundled per-word heads (alexa, jarvis, Ronaldo) are OpenWakeWord sample models named after third-party trademarks and a real person. They are included only to demonstrate the detector. Do not ship them in a product — train or substitute a neutral custom wake word instead.

Pipeline

Three stacked models, streaming at 16 kHz. It mirrors the reference openWakeWord pipeline:

  1. Mel — feed the latest 1760 int16-scaled samples (1280 new + 480 lookback) as [1, samples]; it emits 32-bin mel frames. Apply the reference transform mel = spec / 10 + 2 and append to a mel ring buffer.
  2. Embedding — take the latest 76 mel frames as [1, 76, 32, 1]; it emits one 96-d feature vector (append to a feature ring buffer).
  3. Wake word — take the latest N feature frames as [1, N, 96]; reduce-max the output to a single score in [0, 1]. Fire when it crosses your threshold (≈0.5), with a debounce.

A complete self-contained implementation lives in OpenWakeWord.cs (chunking, mel + feature ring buffers, the FunctionalGraph ReduceMax score head, warmup/debounce, and a Detected event). Minimal usage:

var detector = new OpenWakeWord(detectionThreshold: 0.5f);
detector.Load(modelRoot); // folder holding the two shared models + WakeWord/alexa_v0.1_fp16.sentis
detector.Detected += d => Debug.Log($"{d.Name} {d.Probability:0.00}");
// each frame: push 16 kHz mono samples, then drain
detector.PushSamples(micSamples, micSampleCount);
detector.Pump();          // call regularly (e.g. once per frame)

License & attribution

Apache-2.0. Converted from dscripka/openWakeWord (Apache-2.0).

Downloads last month
33
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support