AI/TLDR

YouDub WebUI

Transcribe, translate, dub and remix a video into another language, locally

Audio, Music & VoiceOpen source
Language
Python
License
Apache-2.0

Overview

YouDub WebUI is an open-source video localization tool that takes a single YouTube, Bilibili or local video and produces a target-language version of it. You import the video, it recognises and translates the content, and then — depending on the task you pick — it outputs a hard-subtitled video that keeps the original audio, a dubbed video with no burned-in subtitles, or a video carrying both. In dubbing mode it separates the vocal track from the background, generates the dubbed speech and mixes the result, so music and sound effects survive the process. The finished video plays and downloads from the web UI.

Its most mature path is English-to-Chinese dubbing of YouTube material; Chinese-to-English dubbing of Bilibili videos is also supported, and Japanese-to-Chinese has been wired up for local files. The maintainer is candid about the state of each direction — the Japanese-to-Chinese path has passed its automated parameter and regression tests but has not yet been signed off against real Japanese media.

The project is not a demo. Its author runs a Bilibili channel with over a million followers and tens of thousands of videos, all of them automatically translated and dubbed with this tool across technology, gaming, science, animals and history. The stated goal is to let individual creators, developers and small teams own a complete localization pipeline locally while keeping the architecture simple enough to understand, debug and extend. It is a self-hosted stack rather than a one-click app: a Python 3.12 backend and a Node frontend, with FFmpeg, large ASR/TTS/separation models and — for full processing — a CUDA GPU. Authentication is mandatory, and the backend refuses to start without a password hash.

What it does

  • Full pipeline in one tool: download or import, transcribe, translate the subtitles, synthesise the dub, mix and render
  • Three output modes per task — hard-subtitled with original audio, dubbed without burned-in subtitles, or both together
  • Vocal and background separation via a bundled Demucs submodule, so music and sound effects are preserved under the dub
  • Voice cloning so the dubbed track resembles the original speaker rather than a stock TTS voice
  • Sources include YouTube, Bilibili and local video files, with proxy and cookie configuration for YouTube
  • Any OpenAI-compatible Chat Completions endpoint drives the translation step — base URL, key and model are yours to choose
  • Mandatory Argon2id login, with proxy settings, cookies, model cache and work folders all kept on the local machine

Getting started

YouDub runs as a FastAPI backend plus a Next.js frontend. You need Python 3.12, Node.js 20+, FFmpeg and ffprobe on PATH, and an OpenAI-compatible endpoint for translation; a CUDA GPU is recommended because transcription, separation and TTS are very slow on CPU. The first run downloads large ASR, TTS and audio models.

Install the system dependencies

FFmpeg and Node are the two that matter. On Windows you need a shared (not static) FFmpeg build, because TorchCodec needs its `av*.dll` runtime libraries.

bashbash
# Ubuntu / Debian / WSL2
sudo apt update
sudo apt install -y ffmpeg nodejs npm

# macOS (Homebrew)
brew install ffmpeg node

Clone with submodules

Demucs ships as a source submodule and is used for vocal separation, so do not skip the submodule step.

bashbash
git clone https://github.com/liuzhao1225/YouDub-webui.git
cd YouDub-webui
git submodule update --init --recursive

Install the Python and frontend dependencies

Create the virtual environment with Python 3.12 specifically. For an NVIDIA GPU, install the CUDA PyTorch wheels from `requirements-pytorch-cu128.txt` before `requirements.txt`; CPU and macOS users skip that and set `DEVICE=cpu`.

bashbash
python3.12 -m venv .venv
.venv/bin/python -m pip install -U pip
.venv/bin/pip install -r requirements.txt

(cd apps/web && npm ci)

Configure and set a login password

Copy the example environment file, then generate an Argon2id hash with an interactive prompt (this keeps the plaintext out of your shell history) and paste it into `YOUDUB_AUTH_PASSWORD_HASH`. The backend will not start without it. Never store the plaintext password or commit a real hash.

bashbash
cp env.txt.example .env

.venv/bin/python -c "from getpass import getpass; from pwdlib import PasswordHash; print(PasswordHash.recommended().hash(getpass('YouDub password: ')))"

Run the backend and frontend

Start the API on port 8000 and the web UI on 3000, then open http://localhost:3000. The frontend calls same-origin `/api/...` URLs and Next.js proxies them to the backend; set `NEXT_SERVER_API_BASE_URL` if the backend is not on local port 8000.

bashbash
.venv/bin/uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000

npm --prefix apps/web run dev -- --hostname 0.0.0.0 --port 3000

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Republish your own videos in another language with a cloned voice instead of commissioning a dub per video
  • Batch-localize a back catalogue of technical or educational content for a second-language audience
  • Produce translated hard subtitles while keeping the original audio, when a dub would be wrong for the material
  • Keep the whole localization pipeline on your own machine when the source media cannot be uploaded to a hosted service

How YouDub WebUI compares

YouDub WebUI alongside other open-source audio, music & voice tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Whisper★ 109kOpenAI's speech recognition model that transcribes and translates audio across many languages.
GPT-SoVITS★ 61.9kAn open-source WebUI that clones a voice from a short audio sample and turns text into speech, with zero-shot and few-shot fine-tuning.
Voicebox★ 54.9kLocal-first voice studio that clones a voice from a short sample, generates speech across seven TTS engines and 23 languages, handles system-wide dictation, and speaks for agents over MCP.
VibeVoice★ 54.4kMicrosoft's text-to-speech model for generating long, expressive multi-speaker audio like podcasts.
whisper.cpp★ 53.7kA dependency-free C/C++ port of Whisper built on ggml, running speech recognition on CPU, Metal, CUDA, Vulkan and NPUs from phones to servers.
Coqui TTS★ 46kA library of text-to-speech models including the multilingual XTTS voice-cloning model.
ChatTTS★ 39.9kChatTTS is an open-source text-to-speech model tuned for dialogue, with multi-speaker support and fine-grained control over laughter, pauses, and prosody.
YouDub WebUI★ 5.5kTranscribe, translate, dub and remix a video into another language, locally