Test 2 skeleton: openwakeword loads via --no-deps split, scores print

This commit is contained in:
2026-06-11 14:54:45 +00:00
parent a301345ec4
commit 2cea1e8de0
5 changed files with 110 additions and 6 deletions
@@ -12,6 +12,8 @@
**Audio note:** The Pi's USB Speaker Phone only supports 48 kHz natively. We set `PA_ALSA_PLUGHW=1` at the top of every test's `main.py` (before importing sounddevice) so PortAudio opens via ALSA's `plughw:` device, which auto-resamples to the requested 16 kHz.
**openwakeword install note:** openwakeword 0.6.0 declares a hard `tflite-runtime` dep that has no Python 3.13 wheel; we install openwakeword with `--no-deps` from a separate `requirements-nodeps.txt` and pin its real runtime deps in the regular `requirements.txt`. `bin/deploy` auto-installs `requirements-nodeps.txt` after `requirements.txt` if it exists.
**Spec:** `docs/superpowers/specs/2026-06-11-voice-assistant-prototypes-design.md`
---
@@ -176,7 +178,10 @@ sshpass -p "$PI_PASS" ssh -o StrictHostKeyChecking=accept-new \
cd '$PI_PATH'
[ -d .venv ] || python3 -m venv .venv
.venv/bin/pip install --upgrade pip -q
.venv/bin/pip install -q -r '$TEST_DIR/requirements.txt'" 2>&1 | REDACT
.venv/bin/pip install -q -r '$TEST_DIR/requirements.txt'
if [ -f '$TEST_DIR/requirements-nodeps.txt' ]; then
.venv/bin/pip install -q --no-deps -r '$TEST_DIR/requirements-nodeps.txt'
fi" 2>&1 | REDACT
echo "==> run $TEST_DIR/main.py"
sshpass -p "$PI_PASS" ssh -t -o StrictHostKeyChecking=accept-new \
@@ -406,15 +411,25 @@ git commit -q -m "Test 1: add playback step — record-play loop complete"
**Files:**
- Create: `tests/02-wakeword/requirements.txt`
- Create: `tests/02-wakeword/requirements-nodeps.txt`
- Create: `tests/02-wakeword/main.py`
- [ ] **Step 1: Write `tests/02-wakeword/requirements.txt`**
- [ ] **Step 1: Write `tests/02-wakeword/requirements.txt`** — openwakeword's real runtime deps for ONNX mode, resolved normally
```
sounddevice==0.5.1
numpy>=2.0
openwakeword==0.6.0
onnxruntime>=1.18
scipy
scikit-learn
tqdm
requests
```
- [ ] **Step 1b: Write `tests/02-wakeword/requirements-nodeps.txt`** — openwakeword itself, installed with `--no-deps` so pip skips the unsatisfiable `tflite-runtime` declared dep
```
openwakeword==0.6.0
```
- [ ] **Step 2: Write `tests/02-wakeword/main.py` — skeleton, prints scores but no detection logic yet**
@@ -457,7 +472,7 @@ def find_usb_device() -> int:
def main() -> int:
print("Ensuring openwakeword onnx models are downloaded (idempotent)...")
openwakeword.utils.download_models(target_directory=None)
openwakeword.utils.download_models()
print("Loading openwakeword model...")
t0 = time.monotonic()
@@ -583,7 +598,7 @@ def beep(device: int) -> None:
def main() -> int:
print("Ensuring openwakeword onnx models are downloaded (idempotent)...")
openwakeword.utils.download_models(target_directory=None)
openwakeword.utils.download_models()
print("Loading openwakeword model...")
t0 = time.monotonic()