Handle bidirectional AEC reference lag#5838
Merged
ComputelessComputer merged 1 commit intoJul 1, 2026
Merged
Conversation
✅ Deploy Preview for old-char canceled.
|
127e092 to
a3d3e5d
Compare
a3d3e5d to
cbc90d8
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cbc90d8. Configure here.
Delay either the speaker reference or mic input based on sync lag, reset AEC state on alignment changes, and cover negative-lag detection in audio sync tests.
cbc90d8 to
4bca97d
Compare
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.

Delay either the speaker reference or mic input based on sync lag, reset AEC state on alignment changes, and cover negative-lag detection in audio sync tests.
Note
Medium Risk
Changes live capture AEC alignment and Soniqo mic gating, which can affect echo cancellation quality and transcript content if thresholds are wrong; scope is audio pipeline only, not auth or data storage.
Overview
AEC capture now aligns mic and speaker using sync lag in both directions: positive lag delays the speaker reference, negative lag delays the mic, and AEC state resets when that alignment changes. Processing uses the aligned pair instead of only shifting the speaker.
audio-sync gains regression tests that negative lag is estimated (GCC-PHAT) and that the sync probe can lock on it.
Soniqo live transcription is refactored onto the same
MixedMessagesingle/dual channels as other adapters (droppingSoniqoAudioMsg). In mic+speaker mode, an echo gate zeros mic chunks that look like delayed, highly correlated speaker bleed before they are sent for transcription, with unit tests for suppress vs keep cases.Reviewed by Cursor Bugbot for commit 4bca97d. Bugbot is set up for automated code reviews on this repo. Configure here.