pyVideoTrans
An open-source video translation toolkit for speech recognition, subtitle translation, multi-role AI dubbing, and voice cloning.
Introduction
pyVideoTrans is a powerful open-source video translation and audio transcription tool developed by Jianchang512. It provides a complete workflow for converting videos from one language to another, including speech recognition (ASR), subtitle translation, multi-role dubbing, and audio-video synchronization — all with an intuitive desktop GUI and CLI interface.
The tool supports both local offline deployment and a wide variety of mainstream online APIs. It integrates state-of-the-art models for ASR (Faster-Whisper, WhisperX, Qwen-ASR), translation (DeepSeek, ChatGPT, Claude, Ollama), and TTS (Edge-TTS, F5-TTS, CosyVoice, GPT-SoVITS). The project is GPLv3 licensed and hosted at github.com/jianchang512/pyvideotrans with documentation at pyvideotrans.com.
Installation
pyVideoTrans offers pre-packaged installers for Windows and source installation for all platforms.
Windows (Pre-packaged)
Download the latest .exe from the GitHub releases page, unzip, and run sp.exe.
Source Installation (macOS/Linux/Windows)
git clone https://github.com/jianchang512/pyvideotrans.git
cd pyvideotrans
uv sync
Prerequisites: Python 3.10, FFmpeg (brew install ffmpeg on macOS, sudo apt-get install ffmpeg on Linux). Use uv sync --all-extras to install all optional channels including WebUI.
Docker
docker build -t pyvideotrans-webui .
docker run -d -p 7860:7860 --name pyvideotrans pyvideotrans-webui
Core Features
- Automatic Video Translation — One-click workflow: ASR → Subtitle Translation → TTS → Video Synthesis
- Audio Transcription — Batch convert audio/video to SRT subtitles with speaker diarization
- Multi-Role AI Dubbing — Assign different AI dubbing voices to different speakers
- Voice Cloning — F5-TTS, CosyVoice, GPT-SoVITS integration for zero-shot voice cloning
- Interactive Editing — Pause and manually proofread at each stage for accuracy
- Vocal Separation — Separate vocals from background music for cleaner processing
- Batch Processing — Process multiple videos in sequence with the CLI
- Format Support — Input any video/audio format, output with synchronized audio and subtitles
Supported Channels & Models
| Category | Options |
|---|---|
| ASR | Faster-Whisper (local), OpenAI Whisper, Qwen-ASR, ByteDance Volcano, Azure, Google |
| Translation | DeepSeek, ChatGPT, Claude, Gemini, MiniMax, Ollama (local), Alibaba Bailian, Google, Microsoft |
| TTS | Edge-TTS (free), OpenAI, Azure, MiniMax, ChatTTS, F5-TTS, CosyVoice, GPT-SoVITS |
| Voice Cloning | F5-TTS, CosyVoice, GPT-SoVITS — zero-shot voice cloning from short audio samples |
CLI & WebUI
pyVideoTrans provides both a desktop GUI (PySide6) and a command-line interface for headless operation:
# GUI
uv run sp.py
# CLI - Video Translation
uv run cli.py --task vtv --name "./video.mp4" \
--source_language_code zh-cn --target_language_code en
# CLI - Audio to Subtitles
uv run cli.py --task stt --name "./audio.wav" --model_name large-v3
# CLI - Subtitle Translation
uv run cli.py --task sts --name "./subs.srt" --target_language_code en
# WebUI (browser-based)
uv sync --extra webui
uv run webui.py
The WebUI is built with Gradio and provides a browser-based interface for remote access or internal network deployment, accessible at http://localhost:7860.
Configuration & GPU Acceleration
pyVideoTrans supports NVIDIA GPU acceleration through CUDA. After installation, replace the CPU-based PyTorch with a CUDA-enabled version for significantly faster processing:
uv remove torch torchaudio
uv add torch==2.7 torchaudio==2.7 --index-url https://download.pytorch.org/whl/cu128
uv add nvidia-cublas-cu12 nvidia-cudnn-cu12
For AMD GPU acceleration, Whisper.NET provides a compatible backend. The application stores its configuration in the videotrans directory and output files in the output directory. All settings are configurable through the GUI or CLI flags.