liuzhao1225/YouDub-Desktop
About
Open-source AI video localization and dubbing for YouTube/Bilibili: speech recognition, subtitle translation, voice cloning, audio mixing and rendering. Open-source AI video translation and dubbing tool.
Design & MediaMeasured star growth
- in 24h
- +6
- in 7 days
- +35
- in 15 days
- +70
- in 1 month
- +138
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
Original
YouDub Desktop
An open-source video localization workspace: import a video, transcribe and translate its speech, clone each sentence from its source audio, and produce subtitles and dubbed video.
中文 · Website and demos · Download latest · Installation and upgrade · Community
Demo
The default demo is the Jensen Huang interview generated on 2026-10-09: sentence-level voice cloning, Chinese subtitles and preserved background audio, approximately 59 seconds long. Source links identify the original videos; the workspace accepts video links and local files.
1. Jensen Huang interview · Latest result
YouTube source · YouTube Shorts · English -> Chinese
| Original English | Chinese dubbed |
|---|---|
https://github.com/user-attachments/assets/befd11ca-e720-4faa-b4e0-d89bfe73df87 |
https://github.com/user-attachments/assets/60d5dbb0-f346-4c14-adad-2d0c481ac4fb |
2. Earlier sample: How much YT paid me for 129 million shorts views
YouTube source · Long-form landscape video · English -> Chinese · The embedded clip shows the first 40 seconds; the full version is available in the demo-assets release
| Original English | Chinese dubbed |
|---|---|
https://github.com/user-attachments/assets/bd02936f-cf3c-4e4b-85b5-0410d38f69f5 |
https://github.com/user-attachments/assets/158de60a-7de4-4ddf-b3d8-478d0423aee6 |
3. Me at the zoo
YouTube source · English → Chinese · 19 seconds
Switch between English and Chinese on the website. Desktop packages include all three examples for offline playback through “View built-in examples” on the workspace or setup screen.
Features
| Output mode | Result |
|---|---|
| Original audio + subtitles | Preserve the original audio and burn target-language subtitles into the video |
| Dubbing | Generate target-language speech, optionally retaining separated background audio |
| Subtitles + dubbing | Produce a dubbed video with subtitles and optional forced alignment |
- Sentence-level voice cloning. Each translated sentence uses the corresponding source sentence's audio as its reference, preserving a one-to-one mapping.
- Subtitle display. Split display cues at commas, Chinese enumeration commas and dashes, merge very short cues, and hide trailing separator punctuation.
- Task management. View covers, step progress, errors and artifacts; cancel, retry, rerun, play or download results.
The workspace lets you choose a video and workflow, then adjust the quick settings declared by its nodes. Languages, models, devices, voices and subtitle options belong to workflow nodes. Settings manages model providers, the local environment and model installation.
Interface Preview
The workspace: import a video and choose languages and output mode. Screenshots show the current Chinese interface.

View the task library and task details
Task library: video covers, processing status and previous tasks.

Task details: preview the video, inspect processing steps, and download dubbed audio and subtitles.

Download and Use
Windows EXE installer · macOS DMG · Release notes and portable package
First startup prepares the base runtime. Models and inference dependencies are prepared for the selected workflow. See the installation guide for requirements and upgrade instructions.
- Add an LLM provider, API key, and translation model in Settings → LLM Providers.
- Import a video in the workspace, choose a workflow and adjust its node options, then prepare the required resources and create a task.
- In the task library, follow progress and play or download the result.
Community
QQ group: 618246010
Run YouDub Desktop from source
YouDub uses a clean three-layer architecture: an ultra-thin Electron desktop shell (apps/desktop), a Vite 8 + React 19 SPA (apps/web), and a pure Python FastAPI runtime (backend/app/server + backend/app/v1).
Requirements: Node.js ^22.19.0 || >=24.0.0, Python 3.12 (.venv or uv), npm, and Git. Initialize submodules when cloning, then run from the repository root:
npm --prefix apps/web ci --registry=https://registry.npmmirror.com
npm --prefix apps/desktop ci --registry=https://registry.npmmirror.com
npm run build
npm start
Development commands:
npm run dev: starts Python FastAPI (8765), Vite 8 dev server (5173), and the Electron window together.npm run dev:web/node scripts/dev.mjs --web-only: runs the Vite 8 SPA + Python FastAPI server for browser debugging.npm run package:desktop -- --dir: packages the standalone desktop app. See release packaging for signing, notarization and installers.
On first launch, select the interface language and data directory, then prepare FFmpeg, yt-dlp, Python packages, and local ML models (Whisper defaults to large-v3-turbo, with optional variant downloads and one-click yt-dlp updates in Resources).
Architecture Overview
apps/desktop (Electron main process & safeStorage credential bridge)
↕ HTTP / SSE (/api/events)
backend/app/server (FastAPI + SQLite WAL + DAG engine + LLM client + ResourceManager)
↕ Child-process ML stages
backend/app/v1 (Whisper + SentenceX + Demucs + Qwen Aligner + VoxCPM2 + FFmpeg)
- Single Python backend:
backend/app/server/owns/api/*REST endpoints, single-channel SSE (/api/events), multi-protocol LLM translation (OpenAI / Anthropic / Gemini with checkpointed per-sentence context), SQLite WAL persistence, and DAG execution spawning isolated Python stage subprocesses to release GPU/RAM cleanly after each stage. - Owned React 19 SPA:
apps/web/owns its Vite 8 build, Tailwind CSS v4 styles, UI primitives,@xyflow/reactworkflow canvas, node-level review editors, and Settings modal. - Ultra-thin Electron shell:
apps/desktop/handles single-instance lock, loopbacksafeStoragebridge, Python backend supervision, native macOS/Windows window chrome, directory picking, and auto-updates.
Current Scope
- Sentence segmentation: Uses
SentenceXwith Whisper word timestamps to form clean sentence boundaries while preserving word-level timing. - Translation protocols: Native support for OpenAI, Anthropic, and Gemini APIs with rolling context and per-sentence checkpoint recovery.
- Inputs: Supports local video formats and single-video YouTube, Shorts, Bilibili, and b23.tv URLs via
yt-dlp+ FFmpeg with no artificial duration or resolution caps. - Workflow graphs: Directed acyclic workflows via
@xyflow/reactsupporting per-node options, review pauses, inline subtitle/translation corrections, and partial reruns.
Development and Tests
.venv/bin/pytest
npm run typecheck
npm run lint
npm test
npm run build
backend/app/server/ FastAPI control plane, SQLite store, DAG runner, LLM client, ResourceManager & SSE hub
backend/app/v1/ Whisper, Demucs, Qwen Aligner, VoxCPM2 & FFmpeg media processing core
backend/tests/ Python backend and ML pipeline unit tests (pytest)
apps/web/ Vite 8 + React 19 + Tailwind CSS v4 SPA, UI primitives, canvas & review editors
apps/desktop/ Ultra-thin Electron shell (main.ts / preload.ts / inno-updater.ts)
scripts/ Dev runner, desktop packager, macOS signing & update feed scripts
submodule/demucs/ Demucs source submodule
Issues and pull requests are welcome for installation improvements, model adapters, and subtitle or audio/video alignment. See Web UI notes and Desktop notes for module details.
License
This project is licensed under Apache License 2.0. See LICENSE.
China mirror: AtomGit, synchronized one way from the primary GitHub repository. Releases, issues and pull requests are maintained on GitHub.
Creator: Zhao Liu · GitHub · Bilibili 黑纹白斑马
Explore related projects
Loading…