feat(wakeword): LyraT/APE wake-word listener for Hey Jarvis#4
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
deploy/wakeword/genie-wake-listen-lyrat.py— production wake-word listener for the Jetson + LyraT (ESP32 I2S2 → APE ADMAIF1) hardware pairplughw:APE,0at 24 kHz stereo, downmixes and resamples 1920→1280 samples (24 kHz→16 kHz) before feeding OpenWakeWord (hey_jarvis_v0.1, ONNX)LISTENINGimmediately on start (after onlynumpyimport, ~0.3 s) so genie-core's short spawn window is met; model loads in a background daemon thread while capture is already runningGENIE_WAKE_DEV,GENIE_WAKE_SR,GENIE_WAKE_THRESHOLD,GENIE_WAKE_GAIN,GENIE_WAKE_MODELKey gotcha: HOME-unset sys.path
genie-core spawns the script with a stripped env (
HOMEunset). Python drops~/.localfromsys.pathwhen HOME is missing, causingModuleNotFoundErrorforopenwakeword/onnxruntime. The script hardcodes the user-site path at the top — this is intentional and load-bearing.Tested on
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 HOMEsudo systemctl restart genie-core→ journal shows[voice] Wake word listener ready