Repository navigation
fix(publish): turn Opus DTX off by default for voice (backport #4808) - #6598
Merged
Merged
Conversation
Chromium stamps Opus output by counting the samples it emits, so every frame DTX suppresses during silence pulls all later audio 20 ms earlier. A microphone published from moq.dev/publish fell seconds behind video within a minute and the catalog delay ratcheted without bound. Ports the code change of #4808 from main onto release. The usedtx knob stays, so the published API is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Collaborator
Author
|
@codex review (Written by Claude Opus 5.5) |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Oct 24, 2026
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.
Backport of #4808 onto
release, so moq.dev/publish stops letting microphone audio fall behind video.Why
Release configures Opus for voice with
usedtx: true. Chromium stamps Opus output by counting the samples it emits, so each frame DTX suppresses during silence pulls all later audio 20 ms earlier. Measured on moq.dev/publish (6f204fd) with a physical camera and microphone, wrappingAudioEncoderin the page:(in - out) × 20 ms equals the timestamp gap exactly. Input stamps stayed within 35 ms of the clock and
encodeQueueSizestayed 0, so this is neither lost capture samples nor an encoder backlog. The DTX keep-alive every 400 ms matches the 400 ms steps the viewer saw in the audio catalogdelay, which drove the steady SUBSCRIBE_UPDATE stream.mainalready fixed this in #4808 and then removed the knob in #4919. A localmainbuild with the same camera showed no drift.Change
Only the code part of #4808: the voice default no longer sets
usedtx, and a test checks that voice configures without DTX and that an explicit request still passes through. The quest file moves in #4808 are left out.API and wire impact
None.
OpusConfig.usedtxstays, so this ships as a patch. A caller that setsusedtx: trueexplicitly still gets DTX and its drift; the field's comment now says so.Checks
bun test src/audio(52 pass),tsc --noEmit, andbiome checkinjs/publish.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)