Skip to main content

Detection threshold

Production and offline tests use the same rule: score ≥ workflow threshold (default 0.5). The Wake Word node exposes one Threshold field in the editor — it applies to all selected models (alexa, hey_jarvis, etc.), not per model. Pass --threshold to offline tools to mirror the value saved on the node:

Offline WAV test (edge worker)

Use a recording that contains the wake phrase (e.g. someone saying “alexa”). Copy into the worker container and run the bundled script:
Success (management command on compile host):
On a live edge worker, look for:
The script:
  • Resamples any WAV rate/channels to 16 kHz mono int16
  • Scores 80 ms frames (1,280 samples)
  • Uses the same Model(wakeword_models=[...]) keys as production

Django management command (compile host)

If openwakeword is installed on the backend container:
Committed fixtures under cyberwave-backend/src/app/tests/fixtures/audio/ cover alexa, hey_mycroft, and hey_jarvis.
  • Pytest (test_wake_word_wav_detection.py, @pytest.mark.integration): asserts each fixture reaches an expected peak score (not that 0.5 always fires for every model).
  • If hey_jarvis at --threshold 0.5 prints No frame reached threshold, lower --threshold to match your workflow node or inspect max_score in the summary line.

Live workflow checklist

Common failures

Log levels

Regression tests (repo)

Backend (Docker):
Frontend:
Integration WAV test (requires openwakeword in test env): test_wake_word_wav_detection.py (marked @pytest.mark.integration).