Skip to content

fix(loudness): cue-out only from silence that extends to EOF — interior pauses are content (gh-#424) - #435

Merged
genwave-radio merged 2 commits into
mainfrom
fix/gh-424-interior-silence-cue-out
Aug 9, 2026
Merged

fix(loudness): cue-out only from silence that extends to EOF — interior pauses are content (gh-#424)#435
genwave-radio merged 2 commits into
mainfrom
fix/gh-424-interior-silence-cue-out

Conversation

@genwave-radio

Copy link
Copy Markdown
Collaborator

Fixes #424 — full analysis lives there. 🎙️✂️

🔍 What was wrong

FfmpegCueAnalyzer.ParseCuePoints took 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 — became liq_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.

  • Interior-pause-only files return CuePoints(cueIn, fileDuration) — not null — so DurationMs (F66.1) stays a real measurement for straddle boundary-fit and cross-duration planning.
  • Entirely-silent files still return null (new head-guard covers the open-ended shape; spec'd).
  • Chose the analyzer over a skip-cue-for-TTS gate in TtsSegmentSource because 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's blank.eat backstop, exactly the posture the class doc already names.

✅ Verification

  • 3 new integration specs against real ffmpeg (interior pause → full extent; interior + trailing → trims only the tail; silence-only → null) + 2 TestMedia generators.
  • Red-checked: the interior-pause spec fails on the pre-fix parser (Assert.InRange — cue-out at the pause start) and passes with the fix.
  • dotnet build 0 warnings; full suite green: 3,602 passed / 0 failed across all 8 test projects.
  • On-box confirmation after deploy: the playout: TTS patter airs truncated at the last pause — cue-out from silencedetect cuts the final sentence of every multi-sentence blurb #424 body's one-liner (silencedetect on a cached blurb) plus ears — back-announce/weather/lead-in should play to their final words.

🚚 Rollout notes

  • TTS blurb/evergreen cues are re-measured per process (in-memory memo + file re-analysis), so playout self-heals on deploy — no cache sweep needed.
  • Persisted cue rows keep their old values until re-measured: music catalog rows (re-enrichment) and authored imaging rows (SafeSegmentAuthor persists cue at authoring). Multi-sentence authored imaging created before this fix may still carry a truncating cue_out — re-author or shout if we want a follow-up migration.
  • playout: TTS patter airs truncated at the last pause — cue-out from silencedetect cuts the final sentence of every multi-sentence blurb #424's riders deliberately not taken here (cache key omits SentencePauseSeconds; blank.eat 1.5s headroom vs the pause-setting range) — still open on the issue.

…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
@genwave-radio
genwave-radio merged commit 8042fd4 into main Aug 9, 2026
11 checks passed
@genwave-radio
genwave-radio deleted the fix/gh-424-interior-silence-cue-out branch August 9, 2026 17:40
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

playout: TTS patter airs truncated at the last pause — cue-out from silencedetect cuts the final sentence of every multi-sentence blurb

1 participant