konradre/video-production-skills / skills/spot-audio-assembly
spot-audio-assembly
VerifiedAssembles the SOUND of a generated-video piece: voice-over takes (one voice and model per role), dubs for refused lines in the character's cloned voice, off-screen lines, sfx with the syllable map confirmed before the cut, music cues cut to markers with ducks, room tone, captions, the stem, and the read of the delivered audio. Use when a line must be voiced or re-voiced, a line was refused, sfx or music must be sourced or cut, captions must be built, a take's audio carries an artifact, or the delivered audio must be verified. Triggers — "generate the VO", "same voice as before", "dub the line", "the off-screen voice", "the sting", "the syllable map", "the music is too loud", "duck the music", "room tone", "captions", "is the vo on time", "musical artifact at the start". Not for placing lines on the timeline or the beat gate — use video-edit-edl. Not for the master render or the delivery encode — use video-finish-qc. Not for LUFS mastering of a finished mix — use mastering-audio.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 22.0 KB |
| references/CAPTIONS.md | markdown | 5.4 KB |
| references/MIX-AND-QC.md | markdown | 13.4 KB |
| references/SFX-AND-MUSIC.md | markdown | 13.2 KB |
| references/VO-PIPELINE.md | markdown | 6.6 KB |
| scripts/audio_head_scan.pyexecutable | script | 3.9 KB |
| scripts/beat_grid.pyexecutable | script | 30.1 KB |
| scripts/build_captions.pyexecutable | script | 8.8 KB |
| scripts/build_vo_stem.pyexecutable | script | 5.7 KB |
| scripts/gen_vo.pyexecutable | script | 7.0 KB |
| scripts/music_loop.py | script | 7.6 KB |
| scripts/music_take_read.py | script | 28.2 KB |
| scripts/qc_vo_placement.pyexecutable | script | 4.2 KB |
| scripts/roomtone_synth.pyexecutable | script | 3.4 KB |
| scripts/sfx_onsets.pyexecutable | script | 7.2 KB |
| scripts/sound_table.pyexecutable | script | 33.5 KB |
| scripts/vo_word_times.pyexecutable | script | 6.4 KB |
| scripts/voice_ab_reel.py | script | 3.9 KB |
scripts/voice_ab_reel.py
View on GitHub#!/usr/bin/env python3
"""voice_ab_reel.py — the A/B reel of voice treatments: each variant once, a gap of silence between, an index printed and
written beside the reel (ordinal · name · start time), so the operator picks by ordinal and the pick goes into the EDL by
name. Processed voice enters a build only after this reel has been heard (spot-audio-assembly § 4).
voice_ab_reel.py --out audio/reels/REEL-line-3.wav raw=takes/line.wav afftdn9=audio/clean/line_light9.wav model=audio/clean/line_dfn.wav [--gap 0.3]
voice_ab_reel.py --selftest
Variants are `name=path` (the name is what the operator will say); the reel is 48 kHz stereo WAV; every variant keeps its own
level (the reel is for hearing the treatment, not the mix).
"""
import argparse, os, subprocess, sys, tempfile
def build(out, variants, gap):
inputs = []; parts = []
for i, (name, path) in enumerate(variants):
if not os.path.exists(path): sys.exit(f'missing variant file: {name}={path}')
inputs += ['-i', path]
pad = f',apad=pad_dur={gap}' if i < len(variants) - 1 else ''
parts.append(f'[{i}:a]aformat=sample_rates=48000:channel_layouts=stereo{pad}[a{i}]')
graph = ';'.join(parts) + ';' + ''.join(f'[a{i}]' for i in range(len(variants))) + f'concat=n={len(variants)}:v=0:a=1[o]'
r = subprocess.run(['ffmpeg', '-v', 'error', '-y', *inputs, '-filter_complex', graph, '-map', '[o]', '-c:a', 'pcm_s24le', out], capture_output=True, text=True)
if r.returncode: sys.exit(f'ffmpeg failed: {r.stderr[-800:]}')
t = 0.0; rows = []
for i, (name, path) in enumerate(variants):
d = float(subprocess.run(['ffprobe', '-v', 'error', '-show_entries', 'format=duration', '-of', 'csv=p=0', path], capture_output=True, text=True).stdout or 0)
rows.append((i + 1, name, t, d)); t += d + (gap if i < len(variants) - 1 else 0)
idx = out + '.index.txt'
with open(idx, 'w', encoding='utf-8') as f:
for n, name, start, d in rows: f.write(f'{n}\t{name}\t{start:.2f}s\t{d:.2f}s\n')
return rows, t, idx
def selftest():
d = tempfile.mkdtemp(); vs = []
for i, sec in enumerate((1.0, 1.5, 2.0)):
p = os.path.join(d, f'v{i}.wav')
subprocess.run(['ffmpeg', '-v', 'error', '-y', '-f', 'lavfi', '-i', f'sine=frequency={220 * (i + 1)}:duration={sec}', '-ar', '48000', p], check=True)
vs.append((f'v{i}', p))
out = os.path.join(d, 'reel.wav'); rows, total, idx = build(out, vs, 0.3)
got = float(subprocess.run(['ffprobe', '-v', 'error', '-show_entries', 'format=duration', '-of', 'csv=p=0', out], capture_output=True, text=True).stdout)
want = 1.0 + 1.5 + 2.0 + 2 * 0.3
ok = abs(got - want) < 0.05 and len(rows) == 3 and rows[2][2] > rows[1][2] > rows[0][2] == 0.0 and os.path.exists(idx)
print(f'SELFTEST {"PASS" if ok else "FAIL"}: reel {got:.2f} s (want {want:.2f}), {len(rows)} rows, index {os.path.basename(idx)}')
sys.exit(0 if ok else 1)
def main():
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument('variants', nargs='*', help='name=path, in the order the operator will hear them')
ap.add_argument('--out'); ap.add_argument('--gap', type=float, default=0.3); ap.add_argument('--selftest', action='store_true')
a = ap.parse_args()
if a.selftest: selftest()
if not a.out or not a.variants: ap.error('--out and at least one name=path are required')
vs = [(v.split('=', 1)[0], v.split('=', 1)[1]) for v in a.variants if '=' in v]
if len(vs) != len(a.variants): ap.error('every variant is name=path')
os.makedirs(os.path.dirname(os.path.abspath(a.out)), exist_ok=True)
rows, total, idx = build(a.out, vs, a.gap)
for n, name, start, d in rows: print(f'{n:2d} {name:<24s} at {start:6.2f} s ({d:.2f} s)')
print(f'reel {a.out} ({total:.2f} s) · index {idx} · the pick goes into the EDL by NAME')
if __name__ == '__main__':
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |