Skip to content

feat(wakeword): LyraT/APE wake-word listener for Hey Jarvis#4

Merged
ai-hpc merged 1 commit into
mainfrom
feat/lyrat-wakeword-listener
Jun 11, 2026
Merged

feat(wakeword): LyraT/APE wake-word listener for Hey Jarvis#4
ai-hpc merged 1 commit into
mainfrom
feat/lyrat-wakeword-listener

Conversation

@ai-hpc

@ai-hpc ai-hpc commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds deploy/wakeword/genie-wake-listen-lyrat.py — production wake-word listener for the Jetson + LyraT (ESP32 I2S2 → APE ADMAIF1) hardware pair
  • Captures plughw:APE,0 at 24 kHz stereo, downmixes and resamples 1920→1280 samples (24 kHz→16 kHz) before feeding OpenWakeWord (hey_jarvis_v0.1, ONNX)
  • Prints LISTENING immediately on start (after only numpy import, ~0.3 s) so genie-core's short spawn window is met; model loads in a background daemon thread while capture is already running
  • All tunables via env vars: GENIE_WAKE_DEV, GENIE_WAKE_SR, GENIE_WAKE_THRESHOLD, GENIE_WAKE_GAIN, GENIE_WAKE_MODEL

Key gotcha: HOME-unset sys.path

genie-core spawns the script with a stripped env (HOME unset). Python drops ~/.local from sys.path when HOME is missing, causing ModuleNotFoundError for openwakeword/onnxruntime. The script hardcodes the user-site path at the top — this is intentional and load-bearing.

Tested on

  • Jetson Orin Nano Super 8 GB, L4T 36.4, LyraT v4.3 connected via I2S2
  • Wake scores: 0.49–0.67 for clear "Hey Jarvis" at 0.5–1.5 m
  • Resident RSS after model load: ~188 MB

Test plan

  • env -i PATH=/usr/bin /usr/bin/python3 -c "import sys; sys.path.insert(0, '/home/aihpc/.local/lib/python3.10/site-packages'); import openwakeword" — passes without HOME
  • sudo systemctl restart genie-core → journal shows [voice] Wake word listener ready
  • Say "Hey Jarvis" at normal voice level → score > 0.35 logged, STT capture starts

Adds deploy/wakeword/genie-wake-listen-lyrat.py — a production wake-word
listener for the Jetson + LyraT (ESP32 I2S2 -> APE ADMAIF1) hardware pair.

Key design points:
- Captures plughw:APE,0 at 24 kHz stereo, downmixes and resamples
  1920->1280 samples (24k->16k) via np.interp before feeding
  OpenWakeWord (hey_jarvis_v0.1, ONNX inference).
- Prints LISTENING immediately (after only numpy import, ~0.3 s) so
  genie-core's short spawn window is met; model loads in a background
  daemon thread (~4 s) while audio capture is already running.
- Hardcodes ~/.local site-packages into sys.path: genie-core spawns
  the script with HOME unset, which silently drops user-site from
  sys.path and causes ModuleNotFoundError for openwakeword/onnxruntime.
- All tunables via env vars: GENIE_WAKE_DEV, GENIE_WAKE_SR,
  GENIE_WAKE_CH, GENIE_WAKE_THRESHOLD (default 0.35),
  GENIE_WAKE_GAIN (default 1.5), GENIE_WAKE_MODEL (default hey_jarvis).
- Protocol: prints WAKE <score> on detection, reads one line from
  stdin (genie-core handshake), then re-opens the mic for the next
  cycle. Exits cleanly on QUIT or SIGTERM/SIGHUP/SIGINT.
@ai-hpc ai-hpc merged commit 7186610 into main Jun 11, 2026
3 checks passed
@ai-hpc ai-hpc deleted the feat/lyrat-wakeword-listener branch June 11, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant