Communitygithub.com

video-audio: voice, real music, beat-cut SFX and a -14 LUFS mix

Agent Skill that does only the sound for a short video or promo: voiceover in your HeyGen cloned voice, a HeyGen public voice or Gemini TTS with captions aligned to real speech, music and sound effects from real recordings first, beat and climax detection, a cut timeline for the picture, then a mix with music under the voice and a loudness and sync self-check before delivery.

What is video-audio: voice, real music, beat-cut SFX and a -14 LUFS mix?

Launch Video recipe step 2 (sound), from limboinf/video-skill (released 2026-10-10; two skills, video-audio for sound and video-director for picture; no license file declared). The README carries a workflow diagram, posters and a 30-second intro video made with the skills. Voiceover comes first because its length sets the film's length; captions are aligned to real speech segments, not to TTS word timestamps. Music and effects come from the HeyGen music and SFX library first, GarageBand Apple Loops when bars must be arranged exactly, and code synthesis only for short effects the library lacks. It measures BPM, beats and the climax so the peak lands on the key moment, and hands the picture a beat-based shot timeline. mix.py keeps music at least 12 dB under speech (15 by default) and effects at least 6 dB under, targets about -14 LUFS with true peak at or below -1.5 dBTP, and exports stems; audio_qa.py checks length match, loudness, peaks, gaps, fade-out and cuts on the beat. It never claims to hear: the data checks, you judge.

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

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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).

Related Skills