01 06
Overview
Dub Studio turns a video into a dubbed version in another language. A user pastes a YouTube link, a whole playlist, or uploads a file, then chooses the target language and voice. The system transcribes the original speech, translates it, generates a new voice track timed to the video, mixes it with the original music if wanted, and returns a finished video with subtitles — built for creators and ministries who want to share talks, sermons and lessons without a studio or voice actors for every video.
02 06
Challenge
Professional dubbing is slow and expensive, so most videos are only ever available in one language. Fully automatic machine translation makes mistakes that matter — changed numbers, wrong Bible references, mistranslated names, or jokes that don’t land — and video processing needs a strong GPU, which a cheap shared web host doesn’t have.
03 06
Solution
A split architecture: a lightweight PHP website on shared hosting handles login, chunked uploads, the job list, the review editor and downloads, while a Windows PC with an NVIDIA GPU does the heavy work. n8n bridges the two — forwarding start, status and cancel calls and holding the OpenAI key — so the PC is never exposed to the internet and no secrets live on the worker. Video files never pass through n8n: the worker pulls uploads from the website and pushes the finished video straight back. The translation step is its own module with a quality gate that checks numbers, glossary terms, Scripture references and subtitle match line by line; critical problems block the job until a named reviewer approves or edits the line, and only failing lines are retranslated with a stronger model to keep costs low.
04 06
Results
Around 7,500 lines across the website, worker and tests. The translation stage is covered by a fast offline suite that includes 14 required real-world cases — numbers, Bible quotes, names, humour and very short lines — with scripted and recorded model answers, so it runs in seconds and gives the same result every time.
- Target languages
- 15
- Translation-stage tests
- 200+
- Max upload, in 5 MB resumable chunks
- 4 GB
05 06
Key features
- Three ways in: a video link, a full playlist (each video queued as its own job), or a file upload up to 4 GB
- 15 target languages, including Spanish, Portuguese, French, Tagalog, Cebuano and Indonesian, with male or female voices
- Content profiles — general, sermon, teaching, business, science, comedy — that set tone, Scripture and number handling, and humour
- Human-in-the-loop review: pause after translation and fix or approve every line next to the English
- Manual mode: download English subtitles plus a ready-made ChatGPT prompt, then upload your own translation
- Background audio options: keep the music without the original voice, dubbed voice only, or original quietly underneath
- Live progress, cancel and resume, and an in-browser player for finished videos
- Jobs survive the GPU PC going offline, stop after three crashes, and keep finished stages on resume
- Password login with CSRF protection, per-job worker keys, and automatic cleanup of old files
06 06
Development process
-
Step 1: Download
yt-dlp fetches single videos or whole playlists; uploaded files are pulled from the website by the worker.
-
Step 2: Transcribe
faster-whisper (large-v3 on CUDA) produces English text with word-level timing on the local GPU.
-
Step 3: Translate
OpenAI through n8n, with Ollama and DeepL as fallbacks, behind a versioned quality gate and optional human review.
-
Step 4: Voice
Microsoft Edge TTS generates the dubbed voice, with Piper for offline voices; Demucs removes the original voice to keep the music.
-
Step 5: Mix
FFmpeg fits timing, mixes the tracks, normalizes loudness to -16 LUFS and uploads the finished video back to the website.
Stack
- PHP
- JavaScript
- Tailwind CSS
- Python
- n8n
- OpenAI
- faster-whisper
- Ollama
- DeepL
- Edge TTS
- Piper
- Demucs
- FFmpeg
- yt-dlp
- pytest



