Devon fixes, theme prompt rewrite, sentence trimmer, cost tracker, normalization

- Fix Devon "if that makes sense" overuse (limit to once per show)
- Suppress Devon failed lookup notifications for self-initiated searches
- Strengthen show theme prompts (2/3 callers call because of theme)
- Fix sentence trimmer splitting on abbreviations (Mr. Mrs. Dr. etc.)
- Fix cost tracker data lost on server restart (persist in checkpoint)
- Ad/ident normalization targets -4dB below dialog for perceived loudness match
- Lower cross-speaker transition threshold to 5s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 03:55:55 -06:00
parent 5d8ab57e20
commit 90e51698b8
3 changed files with 56 additions and 11 deletions
+9 -4
View File
@@ -769,27 +769,32 @@ local function phase2_normalize(dialog_regions, ad_regions, ident_regions, dialo
end
log("Phase 2: Dialog RMS = " .. string.format("%.1f", dialog_rms_db) .. " dBFS")
local dialog_db = dialog_rms_db
-- Ads/idents are pre-compressed dense audio, so they sound louder than dialog
-- at the same RMS. Target a few dB below dialog to match perceived loudness.
local AD_IDENT_OFFSET_DB = -4
local ad_ident_target = dialog_rms_db + AD_IDENT_OFFSET_DB
log("Phase 2: AD/IDENT target = " .. string.format("%.1f", ad_ident_target) .. " dBFS (" .. AD_IDENT_OFFSET_DB .. "dB offset from dialog)")
if #ad_regions > 0 then
progress_detail = "Ads"
coroutine.yield()
log("Phase 2: Normalizing " .. #ad_regions .. " AD region(s)...")
normalize_track_regions(ADS_TRACK, ad_regions, dialog_db)
normalize_track_regions(ADS_TRACK, ad_regions, ad_ident_target)
end
if #ident_regions > 0 then
progress_detail = "Idents"
progress_pct = 0.33
coroutine.yield()
log("Phase 2: Normalizing " .. #ident_regions .. " IDENT region(s)...")
normalize_track_regions(IDENTS_TRACK, ident_regions, dialog_db)
normalize_track_regions(IDENTS_TRACK, ident_regions, ad_ident_target)
end
progress_detail = "Music"
progress_pct = 0.66
coroutine.yield()
log("Phase 2: Normalizing music track...")
normalize_music_track(dialog_regions, dialog_db)
normalize_music_track(dialog_regions, dialog_rms_db)
progress_pct = 1.0
end