Building a Fully Local AI Video Translation & Dubbing Studio – ASR, Context-Aware CJK Translation, TTS and Sync #205553
Replies: 4 comments
|
Hey @anhbaokr The core move: two passes, not streamingPass 1 — extract, before translating a line. Run the full transcript through a local LLM to build:
Pass 2 — translate each cue with speaker label + surrounding cues + the glossary slice injected as hard constraints. Persist the glossary across episodes. Episode 1 seeds episode 2. For a 60-episode xianxia, a human locking 金丹 → "Golden Core" once beats any amount of model cleverness. On genre detection: don't make it a pipeline stage. Buckets are too coarse. Ship style profiles (prompt fragment + glossary pack) the user can pick or override. Cultivation terminology is a glossary problem, and fan-translation conventions are your ground truth. Sync — the constraint that kills amateur dubsChinese is dense; English runs 1.5–2× the syllables. Fix it in translation, not audio:
Also allow cue merge/split — rigid 1:1 cue mapping is a hard quality ceiling. Repos closest to your goal[VideoLingo](https://github.com/Huanshere/VideoLingo) — read this first. Uses a "Translate-Reflect-Adaptation" three-step process for contextual coherence, enforces Netflix-standard single-line subtitles, supports GPT-SoVITS and Fish-TTS. That reflection loop is the QA pass you'd otherwise design yourself. But it can't dub multiple characters separately because WhisperX's speaker distinction isn't reliable enough, and Japanese output is rated noticeably weaker than Chinese. No speaker separation = no register mapping = the exact gap you'd fill. [pyVideoTrans](https://github.com/jianchang512/pyvideotrans) (~16k ⭐) — the best base to fork. Speaker diarization to distinguish roles, per-speaker dubbing voices, F5-TTS/CosyVoice/GPT-SoVITS cloning, and pause-and-proofread at every stage (recognition, translation, dubbing). GPL-v3, CLI + WebUI + desktop, fully offline or API, integrates Qwen3-ASR and Faster-Whisper. That per-stage proofreading hook is where your glossary editor plugs in. [KrillinAI](https://github.com/krillinai/KrillinAI) — Go, LLM-driven, staged CLI invocation with a JSON manifest instead of log parsing. Worth it for the resumable/scriptable design. [Linly-Dubbing](https://github.com/Kedreamix/Linly-Dubbing) (~3k ⭐) — Demucs + UVR5 vocal separation, one-shot cloning from 3–10s, lip-sync via Linly-Talker. Chinese-first audio engineering. [bluez-dubbing](https://github.com/Globluez/bluez-dubbing) — modular, REST API + CLI + web UI, WhisperX word-level timing with VAD alignment. Clean architecture reference. [Chenyme-AAVT](https://github.com/chenyme/Chenyme-AAVT) (~3k ⭐) — minimal baseline to measure against. Components you'll depend on
What I'd build firstDon't build the pipeline. Build glossary + roster extraction + the two-pass translator as a standalone |
|
Hi @anhbaokr
|
|
Hey @anhbaokr, Honestly, the architectural breakdown from @karthikj30 is pretty spot on, because handling character relationship mapping and glossary extraction before translating dialogue cues is basically the only reliable way to keep honorifics and xianxia terminology intact Just to toss in a couple of extra practical points from the local pipeline engineering side:
Like mentioned earlier, definitely start small by building out the standalone subtitle to subtitle extraction and translation loop first before wiring up the full audio and TTS pipeline |
|
You're right that literal translation destroys CJK content — but the gap between "literal" and watchable is mostly context injection, not model quality. The architecture that works in practice: Two-pass translation at the scene/season level, not line-by-line.
ASR: for CJK the practical local defaults are Whisper large-v3 (fine for mixed zh/ja/ko) or, for Mandarin-heavy content, the FunASR/Paraformer family — noticeably better on zh and it gives word-level timestamps. Keep speaker diarization as its own step (pyannote/whisperX); don't trust ASR speaker guesses. TTS + sync: one consistent voice ID per character — GPT-SoVITS (zh, few-shot voice cloning), VOICEVOX/AivisSpeech (ja, consistent but less expressive), community VITS checkpoints for Korean. For timing, reuse the ASR timeline: translate each subtitle cue, generate TTS per cue, align by start timestamp. Accept ±80–120 ms drift per cue; true lip sync on close-ups is an order of magnitude harder and rarely worth it. The error you'll actually fight: genre-term consistency across a 40-episode series. The glossary-in-pass-1 approach keeps 灵气 called the same thing in episode 40 as episode 1 — that's the thing dubbed releases get wrong most visibly. Hardware-wise this is very achievable locally: llama.cpp/LM Studio + a 12B-class qwen model handles pass 1 comfortably; the TTS stack runs on the same box. Happy to go deeper on any of the stages — ASR→translation handoff being the one that breaks pipelines most often. If this maps out the pipeline you need, marking it as accepted helps the next person building the same stack. 🎬 |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
Body
**I'm developing a local AI-powered video studio focused on automatic speech recognition, translation, voice generation, and dubbing synchronization.
The goal is to run the main models locally on the user's computer, with little or no dependence on paid cloud AI APIs.
The current pipeline is roughly:
Video → Local ASR → Context Analysis → Translation → Local TTS → Timing / Lip-Audio Sync → Final Video
One of the biggest challenges I am working on is translation quality for Chinese, Korean, and Japanese video content.
For movies, dramas, anime, historical series, fantasy, cultivation/xianxia, wuxia, modern romance, crime, military, and other genres, a literal translation is often not enough. The system needs to understand:
For example, a Chinese cultivation or wuxia drama should not sound like a modern everyday conversation after translation. Likewise, Korean historical dramas, Japanese anime, crime films, military content, and modern dramas may all require different terminology, tone, and translation rules.
My goal is therefore not only:
Speech-to-Text → Translation → Text-to-Speech
but a more context-aware system such as:
ASR → Dialogue & Scene Context → Genre / Terminology Detection → Translation Memory & Glossary → Semantic Quality Checks → TTS → Dubbing Sync
I would really appreciate recommendations from anyone who has worked on similar problems.
I'm particularly interested in open-source models, algorithms, papers, datasets, translation-memory techniques, terminology management, contextual translation methods, local LLM approaches, ASR correction, TTS, and dubbing synchronization that could help build this type of system.
If you know any GitHub projects or have experience with Chinese / Korean / Japanese media translation and local AI dubbing, I would be very interested in your suggestions.**
Guidelines
All reactions