feat: per-clip WakeWordProbe for benchmark/test harnesses#97
Conversation
Add a self-contained probe that drives a real HotWordEngine over a single clip the way the listening loop does: a few seconds of leading silence to warm the engine's rolling feature window (openWakeWord et al. only emit once it is full, ~2.5 s — too little lead silently drops short positives and biases false rejects), then the clip streamed frame by frame, returning a detection decision plus latency and frames-to-detection. Unlike MiniVoiceLoop it needs no bus or [listener] extra — just the [bench] extra (numpy). Tolerates the HotWordEngine(lang) signature and the vestigial found_wake_word(frame) arg. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 18 minutes and 33 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greetings! The CI pipeline has delivered its findings. 🏗️I've aggregated the results of the automated checks for this PR below. 🔍 LintI've gathered the facts for your review. 📖 ❌ ruff: issues found — see job log 📋 Repo HealthEnsuring the repository remains in peak condition. 🏔️ ✅ All required files present. Latest Version: ✅ 🏷️ Release PreviewThe roadmap for the future just got clearer. 🗺️ Current:
✅ PR title follows conventional commit format. 🚀 Release Channel Compatibility Predicted next version:
📊 CoverageA comprehensive review of our code coverage. 📖 🔒 Security (pip-audit)Locking the doors and checking the windows... 🔒 ✅ No known vulnerabilities found (72 packages scanned). ⚖️ License CheckVerifying the legal status of all dependencies. 📜 ✅ No license violations found. Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed. 🔨 Build TestsEnsuring all components are in alignment. 📏
❌ 3.10: Install OK, tests failed Generated with ❤️ by OVOS Automations |
What
Adds
ovoscope/wakeword_probe.py— a lightweight, self-contained probe that drives a real OVOSHotWordEngineover a single audio clip and returns a per-clip detection decision, latency, and frames-to-detection.Why
Streaming detectors (openWakeWord, microWakeWord, …) only emit a prediction once their rolling mel/embedding window is full (~2.5 s of frames). A clip fed with too little leading silence never fills that window — the activation is missed (a false reject), and on the shortest clips the half-full buffer raises a shape mismatch that drops the sample entirely. The probe primes every clip with a few seconds of leading silence (
PRIME_SECONDS = 3.0) so the window is warm before the keyword arrives, exactly as a live mic keeps the loop warm, then streams the clip frame by frame (1280-sample chunks).Unlike
MiniVoiceLoop(which runs the fullDinkumVoiceLoopand needs the[listener]extra), this is bus-free, VAD-free, and needs only the new[bench]extra (numpy) — ideal for plugin test suites and benchmarks that score detection on labelled fixtures.It also tolerates the
HotWordEngine(key_phrase, config, lang)signature change and the vestigialfound_wake_word(frame_data)argument some plugins keep.Notes
import ovoscopestays light — numpy is imported lazily inside the probe.float32in[-1, 1]at the engine rate (16 kHz). Resample upstream.found_wake_wordsignatures, no-detection path.🤖 Generated with Claude Code