docs(audio): avoid weak music openings in short launch videos (#2882)

* docs(audio): check music energy against final cut

* chore(skills): regenerate skills manifest

---------

Co-authored-by: James <james.russo@heygen.com>
This commit is contained in:
Peter Yang
2026-07-29 15:26:43 -07:00
committed by GitHub
co-authored by James
parent 87791fd01d
commit 30900c3465
3 changed files with 6 additions and 2 deletions
+2
View File
@@ -31,6 +31,8 @@ One music bed per composition, produced by the shared audio engine (`scripts/aud
`volume` comes from the engine's `bgmDefaultVolume()`: `BGM_BED_VOLUME` (currently `0.12` ≈ -18 dB — a bed under the voice) under narration, `BGM_SILENT_VOLUME` (currently `0.9`) for a silent film (no voice). Tune those constants in `scripts/lib/bgm.mjs`, not call sites. An explicit `volume` in `audio_meta.json` always overrides this default. `bgm_pending` is `false` — the file is on disk when the engine returns.
For short launch videos, do not assume the beginning of the retrieved file is the best edit point. Check the opening against later five-second sections. If the track starts with a quiet build but a later section has a stronger, clean musical entrance, trim from that section and apply a short fade-in and longer fade-out. Repeat this check whenever the composition duration changes; the final music file must cover the full cut without a silent tail.
## Local generation (fallback) — Lyria → MusicGen
Spawned **detached** so voice work isn't blocked; `audio_meta.bgm_pending: true` and `bgm_pid` / `bgm_log` are set until it finishes. **Run `scripts/wait-bgm.mjs` before assembling** — it polls the output file / process / log, detects crashes, and writes `bgm_status.json` (`status: ready | failed | timeout | disabled`). A failed/absent track is simply omitted; it never blocks voice/SFX.