Communitygithub.com

video-audio:配音、真实配乐、卡点音效与 -14 LUFS 混音

只负责短视频或宣传片声音的 Agent 技能:用你的 HeyGen 复刻声音、HeyGen 公共声音或 Gemini TTS 配音,字幕按真实说话段落对齐;配乐和音效优先用真实录音;测拍点和高潮,给画面出卡点镜头时间表;最后混音,配乐压在人声下,交付前自检响度和音画同步。

video-audio:配音、真实配乐、卡点音效与 -14 LUFS 混音 是什么?

发布视频配方第 2 步(声音),来自 limboinf/video-skill(2026-10-10 发布;两个技能,video-audio 管声音、video-director 管画面;仓库未声明许可证)。README 里有工作流示意图、海报和一条用这套技能做的 30 秒介绍视频。配音先行,因为配音长度决定片长;字幕对齐到真实说话段落,不信 TTS 返回的字级时间戳。配乐和音效先从 HeyGen 曲库和音效库找,必须按小节精确编排时用 GarageBand 的 Apple Loops,代码合成只做库里没有的短音效。它会测 BPM、拍点和高潮,让高潮砸在关键画面上,并把按拍点排好的镜头时间表交给画面。mix.py 让配乐在说话时至少低 12 dB(默认 15),音效至少低 6 dB,成片约 -14 LUFS、真峰值不高于 -1.5 dBTP,并导出分轨;audio_qa.py 检查音画等长、响度、峰值、断档、结尾淡出和切点落拍。它从不假装能听:数据把关,好不好听由你判断。

兼容平台~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/limboinf/video-skill/tree/HEAD/skills/video-audio

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Video Sound Workbench

Break down the question "what sound should this video have" into four layers: Voiceover → Music → SFX → Mixing. Each layer first searches the library for real recordings, and finally delivers audio files directly importable into video editing projects.

Boundary: Sound only. Leave visuals to video-director (by default it writes code for frame-by-frame rendering, only using HyperFrames, Remotion, CapCut, etc. when the user specifies); this skill only outputs audio files, subtitle timings, time points, and volume recommendations.


Source Priority: Library First, Then Arrangement, Synthesis Last

OrderSourceWhen to UseScript
1User-provided songMust use if given; no substitution allowedbeats.py to detect beat points
2HeyGen Library / SFX Library (default)Look here first for music and SFX: real instruments, real recordings, diverse styles. Selected tracks must be beat-matched using beats.py + beat_timeline.pyheygen_audio.py
3GarageBand arrangementWhen no suitable track exists in the library and bar-accurate arrangement is necessary (e.g., dropping drums in/out to align with visuals). Choose kits based on what loops.py --kits actually lists; don't default to electronic kitsloops.py + arrange.py
4Code synthesisLast resort: truly absent from library, and only for short SFXsynth.py

Why synthesis is last: Model-synthesized sounds all have a similar flavor (noise risers, 808 drops, FM dings), making a whole video sound like "the same old thing." The library contains real recordings, offering different options each time.

arrange.py can combine multiple sources in the same bar grid for mixing and stems export. examples/hype-15s demonstrates this mechanism, not a recommended style—don't replicate its electronic formula for the next project.

Hard Rules for Music and SFX

  1. Music must match the theme, not freelance: First derive a sentence describing what the video sounds like (mood, energy, instruments). Product introductions, project pitches, and launch videos default to dynamic, driving: crisp drums, upward momentum, an explosive section (energetic rock, cinematic percussion, upbeat funk, powerful hip-hop grooves). Save lazy jazz, lounge, lo-fi, ambient pads for when the user requests them or the content is quiet (sleep, meditation, nostalgia).
  2. Neither music nor SFX may overpower voiceover: SFX must be at least 6 dB below the voice during speech (mix.py enforces this). Music must be at least 12 dB below the voice during speech (default 15). Use mix.py to mix; it calculates volumes based on these targets, measures again after mixing, and exits with code 3 if unmet. Real-world test: old manually tuned sidechain compression left music only 1.2 dB below voice—basically equally loud.
  3. Transitions and keyframes must have SFX: One transition SFX per cut (whoosh, page flip, shutter, film click—pick by style) and one hit SFX per key action (land, reveal, stamp, light on). All from the library, volume below voice.
  4. Let the user audition candidates first: 2–3 candidates all within the direction set by the first sentence (not three completely different styles to guess from). Create an audition file and present it with the video-director proposal for user confirmation.
  5. Consult project records: Before starting, read ~/.video-skill/作品记录.md; avoid repeating the last 3 tracks, main instruments. Append after delivery.
  6. Don't default to "electronic sound package": Do not default to the synthetic sound set (riser + 808 drop + impact + brand ding). Make the video dynamic through the music's own drums and arrangement, not through synthetic SFX stacking.

Workflow

  1. Voiceover first, determines duration: The voiceover length determines the video length. Read references/voiceover.md.
    • voiceover.py tts generates voiceover: three sources: --source mine your HeyGen voice clone (default), heygen HeyGen public voices, gemini Gemini 3.8 Flash TTS (--style controls tone). The default engine for cloned voices is often unavailable; it will automatically retry with orca → starfish.
    • voiceover.py align segments the script into subtitles aligned with actual speech segments, outputting cues.json. HeyGen's word-level timestamps are evenly divided across words and cannot be used for subtitle cueing.
  2. List visual beat points: Explosions, transitions, stamps, reveals—at which seconds. This shared timeline is used by both music and SFX. Subtitle dwell time ≥ word count × 0.25s + 0.5s; cue points must not sacrifice readability.
  3. Music: Read references/music.md.
    • Start by writing one sentence of what the video sounds like. Use heygen_audio.py search --type music to find 3–4 stylistically different candidates, splice them into an audition clip for the user to choose.
    • Beat-match the selected track: beats.py detects beats and climax, beat_timeline.py --key <key moments> calculates the start time in the song and produces a beat-aligned shot timeline for the visuals.
    • Only if the library truly lacks a suitable track and bar-accurate arrangement is necessary, use loops.py + arrange.py to compose.
  4. SFX: Read references/sfx.md. First search the HeyGen SFX library for real recordings; only synthesize if unavailable. Arrange by density tier: just transitions and key points, or add cue sounds for keywords. Alignment formula: Start time = hit time − peak offset in file.
  5. Mixing and loudness: Write mix.json, run mix.py: music is auto-ducked by voice (at least 12 dB lower during speech), SFX aligned by peak, final mix at -14 LUFS, true peak -1.5 dBTP, export stems. Read references/mixing.md.
  6. Pre-delivery self-check: audio_qa.py checks: audio-video duration match, loudness, true peak, music gaps, ending fade-out, cut points on beat. Deliver only if exit code 0.

For uncertain styles, create an audition: 8–9 seconds of each candidate spliced into an A/B/C/D clip for the user to pick—far more effective than verbal description.


Ironclad Rules

  1. Only loops from the same kit can be stacked: GarageBand loops are grouped by song (e.g., "Cascade Bass / Lead / Pad"). Mixing across kits easily causes key mismatch and timing problems.
  2. Align to the hit point, not the file start: HeyGen SFX have peak_offset; synthesized SFX synth.py prints the peak.
  3. Subtitle timing is based on actual audio: voiceover.py align aligns the script to real segments separated by silence, without needing Whisper, and does not trust TTS-provided timestamps.
  4. Export stems before delivery: When mixing, export separate stems per source so the user can hear each layer's contribution and easily adjust individual layers.
  5. User specifications are hard requirements: If the user specifies a song, voice service, or "no music," follow it. If unavailable, explain the reason and alternatives in the delivery notes; do not quietly substitute "something similar."
  6. When you can't hear, use data to verify: Use ebur128 for loudness, volumedetect for peak and silence detection, and waveform visuals for structure. The agent has no ears—rely on data for quality control. Ultimately, let the user judge if it sounds good.

Files

FileContentWhen to Read
references/voiceover.mdVoice clones, engine fallback, pause syntax, subtitle alignmentBefore voiceover
references/music.mdSource selection, BPM derivation, arrangement patterns, cueing methods, audition creationBefore music
references/sfx.mdSFX search terms, synthesis recipes, density tiers, alignmentBefore SFX
references/mixing.mdDucking voice, loudness standards, placement in video editors, verification commandsEvery wrap-up
scripts/voiceover.pyList voices / TTS (clone, Heygen public, Gemini) / silence cut / subtitle alignment
scripts/loops.pyScan Apple Loops, filter by BPM and kit
scripts/arrange.pyMix according to plan.json into final track and stems
scripts/heygen_audio.pySearch and download HeyGen music, SFX
scripts/synth.pySynthesize riser / sub / ding / whoosh / tick
scripts/beats.pyDetect BPM, beat points, downbeats, climax, loud/quiet sections of existing tracksWhen using an existing track that needs beat-matching
scripts/beat_timeline.pyAlign climax to key moments, output cut commands and beat-aligned shot timelineSame as above
scripts/mix.pyMix according to mix.json into final audio and stems, check if music overpowers voiceEvery mix
scripts/audio_qa.pyPre-delivery audio self-checkEvery wrap-up
examples/hype-15s/Complete example combining three sources into a 15-second dynamic short track; bash make.sh to reproduceFirst use or when a starting point is needed

Dependencies: ffmpeg, Python 3 + numpy, heygen CLI (logged in), GarageBand on macOS (only uses its asset library at /Library/Audio/Apple Loops, no need to open the app).

相关技能