Skip to content

Add voice-follow to mc-prompter: streaming local ASR tracks the speaker (Phase B) - #5

Closed
bmadcode wants to merge 8 commits into
feat-prompterfrom
feat-prompter-b
Closed

Add voice-follow to mc-prompter: streaming local ASR tracks the speaker (Phase B)#5
bmadcode wants to merge 8 commits into
feat-prompterfrom
feat-prompter-b

Conversation

@bmadcode

Copy link
Copy Markdown
Contributor

What this is

Phase B of mc-prompter, PR 2 of the 3-PR stack (PR 1: #4, the classic teleprompter). This adds voice-follow: the scroll tracks the speaker through the script using streaming local ASR and a deterministic alignment engine. No LLM anywhere in this PR; everything is local and free.

What you get

  • The prompter-lab workspace: ensure_workspace.py builds a persistent venv and downloads the ASR models (~465 MB, consent required, idempotent, resumable against truncated downloads). Without the workspace, tier 1 keeps working untouched.
  • Streaming ASR: sherpa-onnx 1.13.4 with the NVIDIA nemotron-speech-streaming-en-0.6b int8 export (the streaming sibling of the parakeet family already used for cutting) plus silero VAD, on a dedicated worker thread with a bounded drop-oldest queue and an honest BEHIND indicator. An important lane finding is recorded in the skill docs: sherpa-onnx model exports are coupled to the runtime generation (a 2023 zipformer export silently produces garbage under 1.13.4), so runtime and model pins move together and zipformer-small stays a planned lane that exits with a pointer.
  • The alignment engine (align.py, pure stdlib): BPE-aware, tail-revision-tolerant bounded-window matching with a monotonic committed anchor, hold-on-adlib and re-anchor recovery, number/abbreviation normalization, and free skipping of TAKE paragraphs (the lines a creator does not re-record). Its fixture suite runs on seven REAL captured partial-event streams from the actual model (verbatim, ad-lib, skipped sentence, digits-vs-words, tail revisions, take-skip, stopword-heavy ad-lib).
  • Browser capture: getUserMedia with echo cancellation, noise suppression, and auto gain explicitly OFF (they degrade ASR), 16 kHz worklet frames over the existing WebSocket, single capture owner with a token grant, backpressure at both ends. Mic capture stays on the server machine; tablets and phones remain display/control surfaces.
  • The preflight panel: device picker with persistence, live level meter, applied-constraints readback, live partial line, and a tracking check that passes only when the anchor is genuinely following. Voice-follow is off by default.
  • Follow-mode UX: eyeline-led eased scroll, match tinting, HOLD and BEHIND chips, click-any-word to re-anchor, and clean fallbacks for reconnects, mic unplugs, and token rejection.

Verification

  • 210+ unit tests green under the CI quality gate command, genericity lint clean, all Phase A behavior regression-tested
  • A real-model replay harness measured capture-to-anchor latency at 72 ms median over a 32 s read with a fully monotonic anchor
  • Live browser end-to-end on this machine: simulated mic audio through the exact capture path, preflight tracking check passing, the scroll following the voice to precisely where the audio stops, HOLD on silence, zero console errors
  • Adversarial 3-lens review after all of the above found 20 more issues (orphaned process trees, BOM parsing, WS leader races, hide-takes pacing math, a take-paragraph stall in the aligner); all fixed with regression tests and zero recall loss on the captured fixtures

🤖 Generated with Claude Code

https://claude.ai/code/session_01BbneC1PckyV8vkDzhGYkpN

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b6491273-31ff-4566-acdf-df4f51f03c55

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-prompter-b

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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