/ai-video-dubbing:ai-video-dubbingfrom ai-video-dubbing
Build or debug an AI video DUBBING / RECAP pipeline — a foreign-language video turned into a translated voiceover that lands on the right moment on screen. Battle-tested on Chinese short-drama / 漫剧 / manhua / donghua → English (and Hindi) for faceless YouTube. Use whenever the task is: dub or recap a video, translate speech and re-voice it, or FIX audio-video sync — "audio is drifting", "voice is behind the visuals", "the line is missing / silent", "the voice sounds slow and dragged", "it's out of sync", "narration doesn't match the scene". The core insight, learned the hard way: the AI (STT/translate/TTS) is the easy part; getting the pieces to agree on WHEN is the whole game. Encodes the winning architecture (burned-in SUBTITLE OCR as ground-truth timing → isometric translation with syllable budgets → timestamp-anchored TTS with a NO-SLOW fit policy → mux), the ASR dual-pass (full mix + demucs vocal stem) coverage fix, the catalogue of sync failure modes with numeric limits, and the validation methodology that never lies (extract the frame + transcribe the OUTPUT audio). Also covers recap/first-person narration mode. Read this BEFORE writing any transcribe→translate→TTS→mux code or debugging a sync complaint.
Trending skills
7-day visitors to each skill page
Ships in ai-video-dubbing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are building or fixing a pipeline that takes a video in language A and produces a video with a language-B voiceover that lands on the right scene at the right time. Everything here was learned by shipping a Chinese short-drama → English dubber and fighting sync for real. The APIs (speech-to-text, translate, text-to-speech) are commodities. The hard, load-bearing problem is timing.
Measure and validate against the actual rendered artifact — never your intuition, and never even your own validator. Every guess-based fix in this project failed or regressed. Every data-based fix worked. The only ground truth that never lied was: extract the video frame at time T, and transcribe the OUTPUT audio at time T, and compare.
If you take nothing else: before claiming "it's synced," prove it (see
references/03-validation-playbook.md). Before "fixing" a sync bug, measure where
the audio actually is vs. where it should be.
references/04-models-tools-pricing.md).For videos that have burned-in subtitles (Chinese short-dramas always do), the subtitles are a perfect ground-truth script with frame-accurate timing. Use them. This single decision eliminated the entire class of "did we detect it / is it in the right place" bugs.
1. DIALOGUE SOURCE (pick best available):
a. Burned-in subtitle OCR ← BEST: exact text + frame-accurate timing
RapidOCR on the CENTER-bottom band, watermark-filtered, frame-diff dedup
-> [{zh, start, end}]
b. ASR fallback (no subs): Deepgram nova-3, DUAL-PASS on full mix AND the
demucs vocal stem, union-merged (stem recovers speech-over-music the mix
drops). Word-level timestamps. Split long (>~6s) utterances into sub-lines.
2. TRANSLATE — isometric: per-line SYLLABLE budget sized to the AVAILABLE window
(gap to next line), then a VERIFY pass that recounts syllables and rewrites
over-long lines shorter. Syllables predict spoken duration; words/seconds don't.
3. TTS — generate at NATURAL speed. Place each clip at its exact timestamp.
4. FIT — NEVER slow a clip to fill a slot (that is the "dragged voice"). Only
speed up (mildly, cap ~1.5x) when a clip would collide with the next line;
otherwise leave a short silence (invisible to viewers).
5. MUX — voice over the footage. Original music/SFX is OPTIONAL (demucs
sidechain-duck) — drop it freely if it muddies the voice.
Full stage-by-stage detail + the exact code patterns: references/01-pipeline-architecture.md.
Read references/02-sync-failure-modes.md for the full catalogue with numbers.
The greatest hits:
| Symptom | Real root cause (NOT what it looks like) | Fix |
|---|---|---|
| Audio 10–20s behind video, drifts | STT grouped a scene into ONE 20s+ "utterance"; the whole block is placed at the scene start | Split utterances into short sub-lines on word-gap / max-length using word timestamps |
| A line is silent / missing | STT never detected that speech (speech-over-music) — no placement can fix undetected audio | Dual-pass ASR (mix + demucs vocal stem), or better: subtitle OCR |
| Voice sounds slow / robotic / dragged | Time-stretching short clips to "fill gaps" | NEVER slow to fill; natural speed + brief silence; only speed up to avoid collision |
| "Few-second gaps in wording" | English is more concise than source; slot under-filled | Isometric translation (fill the slot by budget) — but never at the cost of #3 |
| Narration races ahead / lags within a block | 3× over-generation (asked for "N sentences" not words) | Word/syllable budget = duration × rate, with a HARD count-and-trim pass |
Never trust "it looks synced." Do this (references/03-validation-playbook.md):
ffmpeg -ss T -frames:v 1 in.mp4 f.jpg, read the frame,
note the on-screen (burned-in) subtitle = ground truth for time T.Full write-up: references/05-engineering-lessons.md. In one screen:
atempo for all pitch-preserving stretch — never librosa.rapidocr-onnxruntime (same
PP-OCR models via ONNX, no paddle dependency) for cross-platform.max_completion_tokens + reasoning_effort and reject
temperature — branch your chat wrapper by model family.Reference index:
references/01-pipeline-architecture.md — every stage, code patterns, paramsreferences/02-sync-failure-modes.md — full failure catalogue with numbersreferences/03-validation-playbook.md — the prove-it methodology + validatorreferences/04-models-tools-pricing.md — STT/TTS/OCR/LLM choices + pricingreferences/05-engineering-lessons.md — the meta-lessons, long formWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub creatorghost/ghost-skills --plugin ai-video-dubbing