fix(loudness): cue-out only from silence that extends to EOF — interior pauses are content (gh-#424) - #435
Merged
Conversation
…or pauses are content An interior silence region (a TTS sentence pause, a quiet mid-track break) was taken as cue-out whenever it happened to be the last region in the file, truncating the final sentence of every multi-sentence patter clip on air. Trailing now means open-ended at EOF or closed within 0.25s of the container duration; interior-only files report the full audible extent so DurationMs (F66.1) stays measured. Closes #424
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #424 — full analysis lives there. 🎙️✂️
🔍 What was wrong
FfmpegCueAnalyzer.ParseCuePointstook the last silence region as cue-out unconditionally. An interior pause that merely happened to be last — a 0.6s injected TTS sentence pause (they clear the 0.5s silencedetect floor), a quiet mid-track break — becameliq_cue_out, and Liquidsoap truncated there. Net effect on air: the final sentence of every multi-sentence patter clip was cut, always at a pause, while booth logs, the cached file, and the preview all looked complete.🔧 The fix (analyzer-level, not a TTS gate)
"Trailing" now means the region actually extends to EOF: open-ended (silence_start with no silence_end), or closed within 0.25s of the container duration. Interior silence never sets cue-out.
CuePoints(cueIn, fileDuration)— not null — soDurationMs(F66.1) stays a real measurement for straddle boundary-fit and cross-duration planning.TtsSegmentSourcebecause the defect is general — a music track with a quiet interior break mis-trims identically — and this keeps TTS leading-silence trim + measured durations. Misclassification degrades in the safe direction only: an untrimmed tail falls to the engine'sblank.eatbackstop, exactly the posture the class doc already names.✅ Verification
TestMediagenerators.Assert.InRange— cue-out at the pause start) and passes with the fix.dotnet build0 warnings; full suite green: 3,602 passed / 0 failed across all 8 test projects.silencedetecton a cached blurb) plus ears — back-announce/weather/lead-in should play to their final words.🚚 Rollout notes
SafeSegmentAuthorpersists cue at authoring). Multi-sentence authored imaging created before this fix may still carry a truncatingcue_out— re-author or shout if we want a follow-up migration.SentencePauseSeconds;blank.eat1.5s headroom vs the pause-setting range) — still open on the issue.