# pyVideoTrans

> Open-source video translation with speech recognition, subtitle translation, and AI dubbing

- Category: Multimodal Generation / Audio, Music & Voice
- Language: Python
- Licence: GPL-3.0
- Repository: https://github.com/jianchang512/pyvideotrans
- Website: https://pyvideotrans.com
- Canonical page: https://ai-tldr.dev/tools/pyvideotrans/

## In short

pyVideoTrans is a free, open-source desktop application that converts a video from one language into another. It runs a complete pipeline: it transcribes the speech, translates the resulting subtitles, generates new dubbed audio, and synchronizes everything back into the video. It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in Python and licensed GPL-3.0.

## Overview

pyVideoTrans is a free, open-source desktop application that converts a video from one language into another. It runs a complete pipeline: it transcribes the speech, translates the resulting subtitles, generates new dubbed audio, and synchronizes everything back into the video.

It works on Windows, macOS, and Linux, and offers both a graphical interface and a command line for headless or batch use. You can run models locally for offline work or plug in many popular online APIs for recognition, translation, and voice synthesis. Each stage can be paused for manual proofreading so you can correct mistakes before moving on.

## What it does

- One-click automatic pipeline: speech recognition to subtitle translation to text-to-speech to video synthesis
- Audio transcription that turns audio or video into SRT subtitles, with speaker diarization to tell different speakers apart
- Multi-role AI dubbing that assigns a different synthetic voice to each speaker, plus zero-shot voice cloning via models like F5-TTS, CosyVoice, and GPT-SoVITS
- Broad model support: Faster-Whisper and OpenAI Whisper for ASR, LLMs such as DeepSeek, ChatGPT, Claude, Gemini, and Ollama for translation, and Edge-TTS, OpenAI, and Azure for speech
- Interactive editing that lets you pause and proofread at the recognition, translation, and dubbing stages
- A command line interface for server deployment and batch processing

## Getting started

Windows users can download a pre-packaged build and run it without installing Python. Developers on macOS, Linux, or Windows can build from source using the uv package manager. FFmpeg must be installed first.

1. Install FFmpeg

   FFmpeg is required and must be on your PATH. On macOS, install it together with the other prerequisites; on Linux use the package manager; on Windows download FFmpeg and configure Path.

```bash
brew install ffmpeg libsndfile git
```

2. Install uv and get the code

   Install the uv package manager, then clone the repository and sync the environment. uv installs all dependencies automatically.

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/jianchang512/pyvideotrans.git
cd pyvideotrans
uv sync
```

3. Launch the graphical interface

   Start the desktop GUI to translate and dub videos through the visual workflow.

```bash
uv run sp.py
```

4. Or run from the command line

   Use the CLI for headless servers or batch jobs. The first example translates a video from Chinese to English; the second turns an audio file into subtitles.

```bash
uv run cli.py --task vtv --name "./video.mp4" --source_language_code zh --target_language_code en
uv run cli.py --task stt --name "./audio.wav" --model_name large-v3
```

## When to use it

- Translate and dub a tutorial or lecture video so viewers who speak another language can watch it with native-sounding audio
- Generate accurate SRT subtitle files in batch from a folder of recordings, with separate labels for each speaker
- Localize marketing or course content for new regions by reusing a speaker's cloned voice across translated versions
