Skip to content

Handle bidirectional AEC reference lag#5838

Merged
ComputelessComputer merged 1 commit into
mainfrom
fix/aec-bidirectional-reference-alignment
Jul 1, 2026
Merged

Handle bidirectional AEC reference lag#5838
ComputelessComputer merged 1 commit into
mainfrom
fix/aec-bidirectional-reference-alignment

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

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 MixedMessage single/dual channels as other adapters (dropping SoniqoAudioMsg). 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.

@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit 4bca97d
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a450a578f83b1000857169f

@ComputelessComputer ComputelessComputer force-pushed the fix/aec-bidirectional-reference-alignment branch 2 times, most recently from 127e092 to a3d3e5d Compare July 1, 2026 07:09
Comment thread crates/listener-core/src/actors/listener/adapters.rs
@ComputelessComputer ComputelessComputer force-pushed the fix/aec-bidirectional-reference-alignment branch from a3d3e5d to cbc90d8 Compare July 1, 2026 08:41

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Fix All in Cursor

❌ 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.

Comment thread crates/listener-core/src/actors/listener/adapters.rs
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.
@ComputelessComputer ComputelessComputer force-pushed the fix/aec-bidirectional-reference-alignment branch from cbc90d8 to 4bca97d Compare July 1, 2026 12:38
@ComputelessComputer ComputelessComputer merged commit 21cc75b into main Jul 1, 2026
10 checks passed
@ComputelessComputer ComputelessComputer deleted the fix/aec-bidirectional-reference-alignment branch July 1, 2026 12:58
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