Repository navigation
fix(cli): preserve ducking gain when music starts later - #5318
Open
user-github-me wants to merge 5 commits into
Open
user-github-me wants to merge 5 commits into
user-github-me wants to merge 5 commits into
Conversation
This branch has not been deployed
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.
What
Make the existing audio-duck tool preserve its composition-time gain when the background music starts during or after narration.
Why
--compositionreads the background audio'sdata-start. Subtracting that start from each ramp and clamping negative times independently replays earlier narration at the music's beginning. For speech at 1–3s and music starting at 4s, the generated lane dips despite there being no overlapping speech. Music beginning halfway through a release also gets a new downward attack instead of continuing the release.Related work
The audio-duck tool was introduced in
ac0153cb3; #4230 moved its engine into CLI source while retaining the standalone copy. #5271 fixed empty-transcript placement before lane generation. This correction addresses the existing tool's clip-origin conversion. Closed #3657 proposed a separate core ducking API; no new API is added here. Current open PRs contain no competing duck-lane correction.How
Build the envelope in composition time first, interpolate its value at the music's start, then retain and rebase only the points after that start. This preserves the remaining duration of a ramp and discards narration that has already finished. Keep the standalone skill and CLI module identical.
Test plan