Skip to content

How-ToGPU

How to Translate and Dub Videos Locally with pyVideoTrans

pyVideoTrans is a free, open-source app that turns a video in one language into a subtitled or dubbed version in another, using speech recognition, translation and AI voices that can all run on your PC. Following the project's own docs, we cover installing it, choosing local models, running a job and fixing dub timing.

By , Systems & Technical Editor

5 min read

How to Translate and Dub Videos Locally with pyVideoTrans

pyVideoTrans is a free, open-source app that takes a video in one language and turns it into a subtitled or dubbed version in another. It strings together four AI steps: speech recognition, subtitle translation, text-to-speech and putting the new audio back on the video. Each step can run on your own PC or call an online service, so you decide how much leaves your machine. 20 (published 29 November 2026).

Only want subtitles in the same language? Our guide to generating subtitles locally with Subtitle Edit is a simpler route.

What you need

  • A Windows 10 or 11 PC for the ready-made package, or Windows, macOS or Linux if you install from source.

  • An NVIDIA graphics card (optional) for GPU acceleration. The README says GPU acceleration in the Windows package is NVIDIA-only and needs CUDA 12.8 and cuDNN 9.11 installed. AMD owners are pointed to a separate Whisper.NET setup guide.

  • Enough video memory for the speech model you pick. The project's FAQ says the largest Whisper model, large-v3, needs at least 8GB of VRAM; smaller models (medium, small, base, tiny) need less but are less accurate.

  • Footage you have the right to translate. The project's disclaimer makes you responsible for having rights to the content you process.

An 8GB card such as the ASUS RTX 5060 8GB Dual OC meets that 8GB figure on paper; a 16GB card like the ASUS RTX 5060 Ti 16GB Dual OC leaves more headroom if you also want to run a local voice-cloning or translation model at the same time. For more on cards for speech recognition, see our best GPUs for Whisper.

Step 1: Install pyVideoTrans

Windows package (easiest):

  1. Download the latest pre-packaged version from the project's GitHub Releases page.

  2. Extract it to a folder whose path has no spaces or non-English characters, such as D:\pyVideoTrans. Don't run it from inside the zip file.

  3. Double-click sp.exe to start it.

From source (Windows, macOS or Linux): the README recommends Python 3.10, FFmpeg on your system path and the uv package manager. Then run:

git clone https://github.com/jianchang512/pyvideotrans.git
cd pyvideotrans
uv sync
uv run sp.py

For NVIDIA acceleration in a source install, the README swaps the CPU build of PyTorch for a CUDA one (uv remove torch torchaudio, then uv add torch==2.7 torchaudio==2.7 --index-url https://download.pytorch.org/whl/cu128 plus the nvidia-cublas-cu12 and nvidia-cudnn-cu12 packages).

Step 2: Choose a speech recognition model

The first stage turns speech into timed subtitles. The README recommends Faster-Whisper, which runs locally, and also lists OpenAI Whisper, WhisperX and Parakeet (for timestamp alignment and speaker diarisation), plus cloud services. Bigger models are more accurate but slower and hungrier for memory. If you see CUDA out of memory or Unable to allocate, the FAQ's fix is to drop from large-v3 to medium, small or base.

Background music can confuse recognition. pyVideoTrans can separate the voice from the background first; the command-line docs say this improves both recognition and dubbing quality. Our best AI stem separation software guide covers dedicated tools for the same job.

Step 3: Pick a translation engine

pyVideoTrans can translate with traditional machine translation (Google, Microsoft), large language models through online APIs (DeepSeek, ChatGPT, Claude, Gemini and others) or locally. For local translation, the README lists Ollama for running a language model on your PC and HY-MT2 and M2M100 as "fully local offline translation". Note that the command-line default is Google, an online service, so change it if you want to stay offline.

The app lets you pause after each stage to proofread the recognised text and the translation before dubbing, which is worth doing: mistakes in the subtitles carry straight into the voice track.

Step 4: Choose a voice

For dubbing, the README lists Edge-TTS (Microsoft's free voices, used through an online service) and local open-source engines that you deploy yourself, including F5-TTS, OmniVoice and Qwen3-TTS (which support voice cloning), plus GPT-SoVITS, Index-TTS and ChatTTS. Commercial APIs such as ElevenLabs, OpenAI and Azure are also supported. You can give different speakers different voices.

Edge-TTS is the quickest start but needs an internet connection. For a fully local workflow, pick one of the self-hosted engines. If you're new to local voices, our best local text-to-speech apps and voice cloning with Chatterbox guides explain the options.

Step 5: Run the translation

In the app, load your video, set the source and target languages, choose the recognition, translation and dubbing options above and start. The same job can be scripted. This command from the README translates a Chinese video into English with an English Edge-TTS voice:

uv run cli.py --task vtv --name "./video.mp4" --source_language_code zh-cn --target_language_code en --voice_role "en-US-GuyNeural"

Useful extras from the command-line docs:

  • --cuda uses your NVIDIA GPU, and --recogn_type 0 --model_name large-v3 selects Faster-Whisper's largest model.

  • --is_separate splits vocals from background sound first.

  • --subtitle_type sets subtitles: 0 none, 1 hard (burned in, the default), 2 soft, 3 bilingual hard, 4 bilingual soft.

  • --voice_role No (the default) skips dubbing and just replaces the subtitles.

Step 6: Fix timing problems

Translated speech is rarely the same length as the original. The FAQ gives the example of a two-second Chinese line that can take three to four seconds in English. pyVideoTrans offers several fixes: speed up long dubbed lines, slow down the video to match, combine both, raise the overall voice speed (for example +10%), or run a second recognition pass on the finished dub for tighter subtitle timing. On the command line these are --voice_autorate, --video_autorate and --recogn2pass.

Dubbing changes the audio but not the speaker's lips. If you need mouth movements to match, see our best local AI lip-sync tools.

Troubleshooting

  • The app won't start or crashes on load: check the folder path contains only English letters and numbers, as the FAQ advises.

  • Out-of-memory errors: use a smaller recognition model, int8 quantisation or a lower beam_size, or close other programs using the GPU.

  • Edge-TTS returns error 403 or silent audio: the FAQ puts this down to Microsoft rate limiting; reduce how many jobs run at once or add pauses.

  • Licences: pyVideoTrans itself is GPL-3.0, but the README notes that each integrated model and online API has its own licence and terms, so check them before commercial use.

The bottom line

pyVideoTrans is one of the most complete free ways to translate and dub a video on your own PC: install the Windows package, use Faster-Whisper for recognition, pick a local translator such as Ollama or M2M100 and a self-hosted voice like F5-TTS if you want to stay offline, and proofread each stage. Edge-TTS and Google are online defaults. Forge PC hasn't tested it.

In this article

Sources

  1. 01pyVideoTrans README (GitHub)
  2. 02pyVideoTrans CLI documentation (GitHub, Chinese)
  3. 03pyVideoTrans FAQ (GitHub, Chinese)
  4. 04pyVideoTrans latest release (GitHub API)
  5. 05pyVideoTrans repository metadata (GitHub API)
  6. 06NVIDIA GeForce RTX 5060 family specifications

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best GPU for Blender in 2026

Best Picks

Best GPU for Blender in 2026

Building or upgrading a PC for Blender rendering? The GPU and its VRAM matter most. We pick the RTX 5070 Ti, RTX 5090, RTX 5060 Ti 16GB, Arc B580, RX 9070 XT and Radeon AI PRO R9700 using the Blender manual, official specs and Puget Systems' credited test results.

Hannah Vance8 min

Best Free Emulators for PC in 2026

Best Picks

Best Free Emulators for PC in 2026

The best free emulators for PC in 2026: RetroArch for retro systems in one app, PCSX2 for PS2, Dolphin for GameCube and Wii, DuckStation for PS1 and PPSSPP for PSP. We compare the systems each covers, licences, BIOS needs, hardware requirements and features from each project's official site, and explain how to stay legal with your own games and BIOS dumps.

Hannah Vance6 min

DLAA vs DLSS: Which NVIDIA Setting Should You Use?

Versus

DLAA vs DLSS: Which NVIDIA Setting Should You Use?

DLAA and DLSS Super Resolution use the same NVIDIA AI model but do opposite jobs: DLSS renders at a lower resolution and upscales for more frames, while DLAA stays at native resolution and uses AI purely for anti-aliasing. Using NVIDIA's documentation, we compare image quality goals, performance, RTX support and models, and show how to enable DLAA with the NVIDIA app.

Callum Reid5 min

How to Set Up PCSX2 on Windows: Play Your PS2 Games on PC

How-To

How to Set Up PCSX2 on Windows: Play Your PS2 Games on PC

PCSX2 can play much of the PlayStation 2 library on a Windows PC at higher resolutions than the original console. Using PCSX2's official documentation, we explain the hardware you need, how to install it, how to dump the BIOS from your own PS2 and your game discs, which renderer to choose, how to save safely and what to check if games run slowly.

Marcus Thorne8 min