Fix: Separate mic/system transcription — segmentation rewrite + WebRTC AEC3 (Phases 1+2)#42
Open
ghnmqdtg wants to merge 13 commits into
Open
Fix: Separate mic/system transcription — segmentation rewrite + WebRTC AEC3 (Phases 1+2)#42ghnmqdtg wants to merge 13 commits into
ghnmqdtg wants to merge 13 commits into
Conversation
Collaborator
Author
Phase 2 added to this PR (same branch)WebRTC AEC3 (vendored Architecture (post-spike):
Tests: 62/62 pass, incl. a real-wasm adapter test (cancellation + 48k→16k resample) and ideal-mock AEC harness tests (bleed removed → no false segment). Still pending: manual speaker smoke test on real hardware (console logs |
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.
Phase 1 of mic/system transcription separation
Fixes cross-attribution between microphone and system-audio transcriptions at the logic level. The acoustic echo cancellation (Phase 2) lands separately.
Root cause
Not a labeling bug —
sourceTypewas always carried correctly. The cross-talk is signal-level: the old per-worklet RMS VAD had no cross-stream arbitration, and (Phase 2) the mic physically picks up computer audio on speakers.What this PR does
SegmentationController(frame-count based, fully unit-tested) replacing the naive in-worklet RMS VAD + ad-hoc chunk buffering.transcription.ts: chunk-buffer/VAD-event path replaced bysendSegment(pcm); dead code removed.Tests
pnpm test:run), incl. 13 new segmentation tests.Scope note
This is Phase 1 (no new dependency). Phase 2 adds WebRTC AEC3 (WASM) for the speaker/acoustic case. Design + plan:
plans/2026-06-19-separate-mic-system-transcription-design.md.Do not merge without review.