Skip to content

Master the audible companion, not just the picture - #310

Merged
ralyodio merged 1 commit into
masterfrom
ads-audio-companion-loudness
Sep 25, 2026
Merged

ralyodio merged 1 commit into
masterfrom
ads-audio-companion-loudness

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The loudness pass in #307 reached the video track and stopped there. The audible companion is encoded from the raw narration rather than from the finished video, so it never inherited that mastering and kept the level the synthesised voice came back at.

That is the half of the path most listeners actually get. A music or radio player asks /api/ads/stream for kind=audio, because a video creative has nowhere to go in a player showing album art, and the companion is the only file it ever plays. So the spot that was brought up to streaming level was the one nobody in an audio slot hears.

Measured on a companion the worker rendered after #307 shipped, so this is not staleness:

mean peak
before -28.5 dB -11.8 dB
after -19.6 dB -3.0 dB

Same target and ceiling as the video track. A test pins the two together: two levels for one spot would mean the advert changed loudness when a listener moved between a video slot and an audio one.

Found while checking whether a nixamp live would play a correctly levelled advert. It would not: nixamp's slot is active and filling, and it asks for kind=audio.

Note for after the merge: this fixes what the worker renders next. The 183 already published spots keep their current audio until they are re-rendered.

🤖 Generated with Claude Code

The loudness pass reached the video track and stopped there. The audible
companion is encoded from the raw narration rather than from the finished
video, so it never inherited that mastering and kept the level the synthesised
voice came back at.

That is the half of the path most listeners actually get. A music or radio
player asks /api/ads/stream for kind=audio, because a video creative has
nowhere to go in a player showing album art, and the companion is the only
file it ever plays. So the spot that was brought up to streaming level was the
one nobody in an audio slot hears.

Measured on a companion the worker rendered after the video fix shipped:
-28.5 dB mean before, -19.6 after, peak -3.0.

Same target and ceiling as the video track, and a test pins them together: two
levels for one spot would mean the advert changed loudness when a listener
moved between a video slot and an audio one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

49 finding(s)

HIGH/CRITICAL: 2 | MEDIUM: 32 | LOW: 15

Severity Rule Location
HIGH tls-verification-disabled lib/onion.ts:48
HIGH secret-generic-credential lib/sp/platforms/facebook.ts:32
MEDIUM js-unescaped-html-sink app/(app)/dashboard/admin/email-broadcast/EmailBroadcastForm.tsx:125
MEDIUM js-unescaped-html-sink app/(app)/dashboard/projects/[id]/autoblog/articles/[articleId]/page.tsx:214
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:67
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:97
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:104
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:110
MEDIUM js-unescaped-html-sink app/(marketing)/recent/page.tsx:186
MEDIUM js-unescaped-html-sink app/(marketing)/recent/page.tsx:190
MEDIUM js-unescaped-html-sink app/c/[project]/[slug]/page.tsx:77
MEDIUM js-unescaped-html-sink app/c/[project]/page.tsx:57
MEDIUM js-unescaped-html-sink app/careers.js/route.ts:228
MEDIUM js-unescaped-html-sink app/careers.js/route.ts:285
MEDIUM js-unescaped-html-sink app/layout.tsx:129
MEDIUM js-open-redirect app/login/form.tsx:39
MEDIUM js-unescaped-html-sink app/r/[token]/page.tsx:176
MEDIUM js-open-redirect app/signup/form.tsx:43
MEDIUM js-open-redirect components/billing/buy-credits-modal.tsx:98
MEDIUM js-unescaped-html-sink components/json-ld.tsx:8
MEDIUM js-unescaped-html-sink components/report/markdown-view.tsx:15
MEDIUM js-unescaped-html-sink lib/careers/page-templates.ts:198
MEDIUM js-dynamic-code-execution lib/crawl-limits.ts:67
MEDIUM redos-nested-quantifier lib/emailMarkdown.ts:41
MEDIUM redos-nested-quantifier lib/emailMarkdown.ts:324
MEDIUM redos-nested-quantifier lib/lx/articleGen.ts:99
MEDIUM redos-nested-quantifier lib/tracker/agent-gate.ts:61
MEDIUM sh-predictable-temp-path ops/selfhost/server/setup-supabase.sh:201
MEDIUM sh-remote-script-execution prober/deploy/provision.sh:30
MEDIUM sql-template-interpolation scripts/detect-slot-themes.ts:31
MEDIUM sql-template-interpolation scripts/purge-constructed-keywords.ts:163
MEDIUM sql-template-interpolation scripts/purge-offniche-keywords.ts:124
MEDIUM js-dynamic-code-execution scripts/test-crawl-limits.mjs:14
MEDIUM js-dynamic-code-execution scripts/test-crawl-limits.mjs:24
LOW secret-generic-credential app/(marketing)/docs/autoblog-webhook/page.tsx:145
LOW secret-generic-credential lib/sp/platforms/linkedin.ts:25
LOW js-dynamic-code-execution tests/careers-page-templates.test.ts:21
LOW js-dynamic-code-execution tests/careers-widget-script.test.ts:19
LOW js-dynamic-code-execution tests/careers-widget-script.test.ts:69
LOW js-dynamic-code-execution tests/contract/ad-visitor-id.test.ts:51
LOW js-dynamic-code-execution tests/contract/ad-visitor-id.test.ts:52
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:20
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:24
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:25
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:26
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:31
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:35
LOW secret-generic-credential tests/contract/posthog-integration.test.ts:13
LOW secret-generic-credential tests/lead-campaign.test.ts:16

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit bd39722 into master Sep 25, 2026
10 checks passed
@ralyodio
ralyodio deleted the ads-audio-companion-loudness branch September 25, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant