源码部署前必须安装 FFmpeg 并配置到环境变量,否则无法运行;默认不安装 whisper.net 和 WebUI,需分别加 --extra dotnet、--extra webui;Windows 预打包版需解压到不含中文和空格的路径,且不能直接在压缩包内运行。
pyvideotrans
jianchang512GPL-3.0活跃维护把视频从一种语言翻译成另一种语言,自动生成配音和字幕并嵌入视频,适合做视频本地化和跨语言内容分发。
Translate the video from one language to another and embed dubbing & subtitles.
git clone https://github.com/jianchang512/pyvideotrans.git
cd pyvideotrans
uv sync
uv run sp.pyREADME 未给出具体显存要求;NVIDIA GPU 加速需 CUDA 12.8 与 cuDNN 9.11,AMD GPU 可通过 Whisper.NET 加速,未装 GPU 时可走 CPU 版本 PyTorch。
开源视频翻译工具,一条龙完成语音识别、字幕翻译、AI配音与音视频合成
把视频从一种语言翻译成另一种语言,自动生成配音和字幕并嵌入视频,适合做视频本地化和跨语言内容分发。
核心能力
- 一键串联 ASR、字幕翻译、TTS 与视频合成全流程
- 支持说话人分离,为不同角色分配不同配音音色
- 集成 F5-TTS、CosyVoice、GPT-SoVITS 实现零样本声音克隆
- 可暂停并人工校对识别、翻译、配音各阶段结果
- 提供 CLI 无头运行与 WebUI 浏览器访问两种方式
容易踩的坑
- v4.18windows-v4.18最新正式版2026-11-05 · 2026-11-05 14:17 UTC
v4.18 Win10/11 预打包版本下载
-
安装依赖:
# macOS brew install libsndfile git brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg # Ubuntu/Debian sudo apt-get install ffmpeg libsndfile1-dev -
安装 uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
克隆并启动:
git clone https://github.com/jianchang512/pyvideotrans.git cd pyvideotrans uv sync uv run sp.py
v4.18 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1a32u2WqH9BXbe7TM0SeK8w?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.18.7z?download=true
v4.18 补丁包下载(400MB)
补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。
- 百度网盘地址: https://pan.baidu.com/s/15pGAzKkIVP2jdiCdICQWjA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-PatchUpdate-v4.18.7z?download=true
- 解压7z压缩包,解压后,找到
sp.exe文件,双击即可启动软件,不可在压缩包内双击运行。 - 不要将软件解压到桌面或 C 盘的
Program Files等需要管理员权限的文件夹下。 - 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
- 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压
v4.14 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1nPX5v_kqcOUzaqk9Zu33PA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.14.7z?download=true
v4.03 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1yENT4t7E5K1OrbOFS7WEvA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.03-0626.7z?download=true
What's Changed
- feat(translator): add Runcrate translation channel by @heydryft in https://github.com/jianchang512/pyvideotrans/pull/1240
- feat(translator): add CloudGPU translation channel by @mrhy7176 in https://github.com/jianchang512/pyvideotrans/pull/1242
- feat(mainwin): ask before starting when the TTS channel may not support the target language by @Venius24 in https://github.com/jianchang512/pyvideotrans/pull/1243
- fix(align): write the silent placeholder of a failed line at 48 kHz stereo by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1244
- fix(dubbing): apply the volume setting in subtitle dubbing by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1245
- fix(tts): convert Doubao 2.0 audio to 48 kHz stereo like other channels by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1246
- fix(tts): write Doubao 2.0's mono PCM to both channels by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1247
- fix(translator): stop a line ending in an ellipsis from joining the next by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1248
- test(tts): expect the mono wav that the Doubao 2.0 channel now saves by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1249
- fix(translator): strip multi-line blocks before reading the translation by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1250
- fix(align): in video slow-down, end the last slot where the video ends by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1252
- fix(dubbing): import subtitles without [speaker] tags in multi-role dubbing again by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1253
- fix(ui): take dropped files from their URLs and list their names by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1255
- fix(prepare): escape the speaker name when removing its [Name] tag by @tanishqbaweja in https://github.com/jianchang512/pyvideotrans/pull/1254
- fix(ui)
-
- v4.17windows-v4.172026-10-23 · 2026-10-23 06:42 UTC
查看更新说明
v4.17 Win10/11 预打包版本下载
-
安装依赖:
# macOS brew install libsndfile git brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg # Ubuntu/Debian sudo apt-get install ffmpeg libsndfile1-dev -
安装 uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
克隆并启动:
git clone https://github.com/jianchang512/pyvideotrans.git cd pyvideotrans uv sync uv run sp.py
Changelog
- 修复: nemotronasr 重复下载问题
- 降噪和人声分离模型增加基于
audio.cpp的zipenhancer和mel_band_roformer,可在高级选项中切换 - Deepsek/智谱AI等多个翻译渠道增加思考深度设置
- 高级选项-字幕翻译中增加
进一步精简选项,在AI翻译时追加要求极致精简提示词,以便缩减译文避免配音时长超出太多 - 语音识别渠道增加
Audio.cpp,基于audio.cpp的几个gguf模型 - 修复其他已知问题 #1234
What's Changed
- Block SSRF via unvalidated ffmpeg_cmd advanced setting by @router0mail in https://github.com/jianchang512/pyvideotrans/pull/1225
- feat(translator): add Opper translation channel / 新增 Opper 翻译渠道 by @Felixkw12 in https://github.com/jianchang512/pyvideotrans/pull/1235
- fix(edge-tts): retry on websocket errors, never cache partial audio (#1234) by @Venius24 in https://github.com/jianchang512/pyvideotrans/pull/1237
- fix: invalid escape sequences (SyntaxWarning on Python 3.12+) by @Pharex38 in https://github.com/jianchang512/pyvideotrans/pull/1239
Full Changelog: https://github.com/jianchang512/pyvideotrans/compare/v4.16...v4.17
v4.17 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1GFrVSBhCoROacb5GplyTuw?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.17-1028.7z?download=true
v4.17 补丁包下载(400MB)
补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。
- 百度网盘地址: https://pan.baidu.com/s/1gfTj-LbvdCB7G6DNtQ1_3Q?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-PatchUpdate-v4.17-1028.7z?download=true
- 解压7z压缩包,解压后,找到
sp.exe文件,双击即可启动软件,不可在压缩包内双击运行。 - 不要将软件解压到桌面或 C 盘的
Program Files等需要管理员权限的文件夹下。 - 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
- 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压
v4.16 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1XlK6dvf-4UoiWvjtEtqaAg?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.16.7z?download=true
v4.14 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1nPX5v_kqcOUzaqk9Zu33PA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.14.7z?download=true
v4.03 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1yENT4t7E5K1OrbOFS7WEvA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.03-0626.7z?download=true
New Contributors
- @router0mail made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1225
- @Felixkw12 made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1235
- @Venius24 made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1237
- @Pharex38 made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1239
-
- v4.16windows-v4.162026-10-13 · 2026-10-13 06:06 UTC
查看更新说明
v4.16 Win10/11 预打包版本下载
-
安装依赖:
# macOS brew install libsndfile git brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg # Ubuntu/Debian sudo apt-get install ffmpeg libsndfile1-dev -
安装 uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
克隆并启动:
git clone https://github.com/jianchang512/pyvideotrans.git cd pyvideotrans uv sync uv run sp.py
Changelog
- 修复 Edge-TTS 403问题,Macos和linux或windows源码部署版本,请执行命令更新
uv add git+https://github.com/rany2/edge-tts.git,若出错,则先执行uv remove edge-tts后再重新更新 - 增加 配音渠道 audio.cpp 后端
- 增加 配音渠道 fish.audio api 支持
- 规范化 params.json 中参数名称,某些渠道的SK、api地址等信息,在更新后可能需要重新填写
- 高级选项
字幕翻译增加使用LLM重新断句替代LLM纠错,若选中该项及LLM纠错,将在语音识别后一次性将识别结果提交给AI模型重新断句和修正错误 - 修复已知bug
-
feat(translator): add Atlas Cloud translation channel / 新增 Atlas Cloud 翻译渠道 by @binyangzhu000-sudo in https://github.com/jianchang512/pyvideotrans/pull/1222
-
feat(webui): add French interface localization by @didlawowo in https://github.com/jianchang512/pyvideotrans/pull/1204
-
New Contributors
-
@binyangzhu000-sudo made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1222
-
@didlawowo made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1204
Full Changelog: https://github.com/jianchang512/pyvideotrans/compare/v4.15...v4.16
v4.16 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1XlK6dvf-4UoiWvjtEtqaAg?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.16.7z?download=true
v4.16 补丁包下载(390MB)
补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。
- 百度网盘地址: https://pan.baidu.com/s/1_pBNI9tnW-ZwauHVg-6lJA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-PatchUpdate-v4.16.7z?download=true
- 解压7z压缩包,解压后,找到
sp.exe文件,双击即可启动软件,不可在压缩包内双击运行。 - 不要将软件解压到桌面或 C 盘的
Program Files等需要管理员权限的文件夹下。 - 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
- 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压
v4.14 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1nPX5v_kqcOUzaqk9Zu33PA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.14.7z?download=true
v4.03 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1yENT4t7E5K1OrbOFS7WEvA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.03-0626.7z?download=true
-
- v4.15windows-v4.152026-10-04 · 2026-10-04 05:13 UTC
查看更新说明
v4.15 Win10/11 预打包版本下载
-
安装依赖:
# macOS brew install libsndfile git brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg # Ubuntu/Debian sudo apt-get install ffmpeg libsndfile1-dev -
安装 uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
克隆并启动:
git clone https://github.com/jianchang512/pyvideotrans.git cd pyvideotrans uv sync uv run sp.py
更新日志/Changelos
- 更新 Deepgram.com 渠道模型并增加语音合成支持
- 更新 Elevenlabs.io 模型并移除将被废弃的模型
- 增加
菜单-工具-高级选项-字幕配音-移除每条字幕配音全部静音缓冲和静音移除力度可调节移除更多或更少静音 - 修复已知bug
What's Changed
- feat(recognition): add Audexum speech-to-text channel by @audexum in https://github.com/jianchang512/pyvideotrans/pull/1216
- feat(translator): add Infistar translation channel by @lx7738 in https://github.com/jianchang512/pyvideotrans/pull/1217
- feat(language): add Azerbaijani to main language codes by @pateti-hub in https://github.com/jianchang512/pyvideotrans/pull/1219
New Contributors
- @audexum made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1216
- @lx7738 made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1217
- @pateti-hub made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1219
Full Changelog: https://github.com/jianchang512/pyvideotrans/compare/v4.14...v4.15
v4.15 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1ngWmrtUwb1OOY-LeUVu_SQ?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.15.7z?download=true
v4.15 补丁包下载(390MB)
补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。
- 百度网盘地址: https://pan.baidu.com/s/1zDoz0SSLfzh4t3o2g_Kpkg?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-PatchUpdate-v4.15.7z?download=true
- 解压7z压缩包,解压后,找到
sp.exe文件,双击即可启动软件,不可在压缩包内双击运行。 - 不要将软件解压到桌面或 C 盘的
Program Files等需要管理员权限的文件夹下。 - 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
- 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压
v4.14 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1nPX5v_kqcOUzaqk9Zu33PA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.14.7z?download=true
v4.03 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1yENT4t7E5K1OrbOFS7WEvA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.03-0626.7z?download=true
-
- v4.14windows-v4.142026-09-26 · 2026-09-26 05:13 UTC
查看更新说明
v4.14 Win10/11 预打包版本下载
-
安装依赖:
# macOS brew install libsndfile git brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg # Ubuntu/Debian sudo apt-get install ffmpeg libsndfile1-dev -
安装 uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
克隆并启动:
git clone https://github.com/jianchang512/pyvideotrans.git cd pyvideotrans uv sync uv run sp.py
更新日志/Changelos
- 优化 语音/字幕/画面 对齐算法
- Google翻译前先检测,无法使用或429拦截,自动切换 微软翻译
- 优化 openai-whisper 模型下载
- 修复已知bug
v4.14 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1nPX5v_kqcOUzaqk9Zu33PA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.14.7z?download=true
v4.14 补丁包下载(360MB)
补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。
- 百度网盘地址: https://pan.baidu.com/s/1DqTHVx93-jgumn8WW_fsqQ?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-PatchUpdate-v4.14.7z?download=true
- 解压7z压缩包,解压后,找到
sp.exe文件,双击即可启动软件,不可在压缩包内双击运行。 - 不要将软件解压到桌面或 C 盘的
Program Files等需要管理员权限的文件夹下。 - 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
- 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压
v4.13 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1Ff__zBpMAVKJE-7A9t-a7w?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.13-1.7z?download=true
v4.12 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/11LKtD3l5Ti-H2DprXRqNrg?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.12-0913.7z?download=true
v4.03 完整包下载(2.7G)
- 百度网盘地址: https://pan.baidu.com/s/1yENT4t7E5K1OrbOFS7WEvA?pwd=1234
- huggingface.co: https://huggingface.co/mortimerme/repocollect/resolve/main/win-pyvideotrans-v4.03-0626.7z?download=true
What's Changed
- feat(translator): add Cheaper Inference provider support by @aiapienthusiast in https://github.com/jianchang512/pyvideotrans/pull/1213
New Contributors
- @aiapienthusiast made their first contribution in https://github.com/jianchang512/pyvideotrans/pull/1213
Full Changelog: https://github.com/jianchang512/pyvideotrans/compare/v4.13...v4.14
-
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
pyVideoTrans
Sponsors Recall.ai Meeting Transcription API If you’re looking for a transcription API for meetings, consider checking out Recall.ai , an API that works with Zoom, Google Meet, Microsoft Teams, and more OfoxAI: Text, speech, image and video model APIs Access GPT, Claude, Gemini and DeepSeek text models, ElevenLabs speech models, and image and video generation models with one API key—choose the models that fit your creative needs.
A Powerful Open Source Video Translation / Audio Transcription / AI Dubbing / Subtitle Translation Tool
简体中文 | Documentation | Online Q&A
pyVideoTrans is dedicated to seamlessly converting videos from one language to another, offering a complete workflow that includes speech recognition, subtitle translation, multi-role dubbing, and audio-video synchronization. It supports both local offline deployment and a wide variety of mainstream online APIs.
Core Features
- Fully Automatic Video Translation: One-click workflow: Speech Recognition (ASR) → Subtitle Translation → Speech Synthesis (TTS) → Video Synthesis.
- Audio Transcription / Subtitle Generation: Batch convert audio/video to SRT subtitles, supporting Speaker Diarization to distinguish between different roles.
- ️Multi-Role AI Dubbing: Assign different AI dubbing voices to different speakers.
- Voice Cloning: Integrates models like F5-TTS, CosyVoice, GPT-SoVITS for zero-shot voice cloning.
- Powerful Model Support:
- ASR: Faster-Whisper (Local), OpenAI Whisper, Alibaba Qwen, ByteDance Volcano, Azure, Google, etc.
- LLM Translation: DeepSeek, ChatGPT, Claude, Gemini, MiniMax, Ollama (Local), Alibaba Bailian, etc.
- TTS: Edge-TTS (Free), OpenAI, Azure, Minimaxi, ChatTTS, ChatterBox, etc.
- ️Interactive Editing: Supports pausing and manual proofreading at each stage (recognition, translation, dubbing) to ensure accuracy.
- ️Utility Toolkit: Includes auxiliary tools such as vocal separation, video/subtitle merging, audio-video alignment, and transcript matching.
- Command Line Interface (CLI): Supports headless operation, convenient for server deployment or batch processing.
- Web Interface (WebUI): Browser-based interface for remote access or internal network deployment.
Quick Start (Windows Users)
We provide a pre-packaged .exe version for Windows 10/11 users, requiring no Python environment configuration.
- Download: Click to download the latest pre-packaged version
- Unzip: Extract the compressed file to a path without Chinese characters or spaces (e.g.,
D:\pyVideoTrans). - Run: Double-click
sp.exeinside the folder to launch.
Note:
- Do not run directly from within the compressed archive.
- To use GPU acceleration(NVIDIA GPU only), ensure CUDA 12.8 and cuDNN 9.11 are installed.
️ Source Deployment (macOS / Linux / Windows Developers)
We recommend using uv for package management for faster speed and better environment isolation.
1. Prerequisites
- Python: Recommended version 3.10
- FFmpeg: Must be installed and configured in the environment variables.
- macOS:
brew install libsndfile git [email protected] brew uninstall --ignore-dependencies ffmpeg brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg- Linux (Ubuntu/Debian):
sudo apt-get install ffmpeg libsndfile1-dev - Windows: Download FFmpeg and configure Path, or place
ffmpeg.exeandffprobe.exedirectly in the project directory.
2. Install uv (If not installed)
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
3. Clone and Install
git clone https://github.com/jianchang512/pyvideotrans.git
cd pyvideotrans
uv sync
By default,
whisper.netandWebUIare not installed locally.
- To install all optional channels:
uv sync --all-extras- To install whisper.net:
uv sync --extra dotnet- To install WebUI:
uv sync --extra webui
4. Launch Software
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 --voice_role "en-US-GuyNeural"
# Audio to Subtitle
uv run cli.py --task stt --name "./audio.wav" --model_name large-v3
# Subtitle Translation
uv run cli.py --task sts --name "./subs.srt" --target_language_code en
# Text to Speech
uv run cli.py --task tts --name "./subs.srt" --voice_role "zh-CN-YunyangNeural"
WebUI (for remote/internal network access):
uv sync --extra webui
uv run webui.py
Docker (containerized deployment):
# Build
docker build -t pyvideotrans-webui .
# Run
docker run -d -p 7860:7860 --name pyvideotrans pyvideotrans-webui
# With persistent config and output
docker run -d -p 7860:7860 \
-v ./data/output:/app/output \
-v ./data/config:/app/videotrans \
--name pyvideotrans pyvideotrans-webui
5. (Optional) NVIDIA GPU Acceleration Configuration
If you have an NVIDIA graphics card, execute the following commands to install the CUDA-supported PyTorch version:
# Uninstall CPU version
uv remove torch torchaudio
# Install CUDA version (Example for CUDA 12.x)
uv add torch==2.7 torchaudio==2.7 --index-url https://download.pytorch.org/whl/cu128
uv add nvidia-cublas-cu12 nvidia-cudnn-cu12
Supported Channels & Models (Partial)
| Category | Channel/Model | Description |
|---|---|---|
| ASR (Speech Recognition) | Faster-Whisper (Local) | Recommended, fast speed, high accuracy |
| WhisperX / Parakeet | Supports timestamp alignment & speaker diarization | |
| Alibaba Qwen3-ASR / ByteDance Volcano | Online API, excellent for Chinese | |
| Translation (LLM/MT) | DeepSeek / OpenAIChatGPT | Supports context understanding, more natural translation |
| MiniMax/Zhipu/Xiaomi/Gemini | latest flagship model, OpenAI-compatible | |
| Google / Microsoft | Traditional machine translation, fast speed | |
| HY-MT2 / M2M100 | Fully local offline translation | |
| TTS (Speech Synthesis) | Edge-TTS | Microsoft free interface, natural effect |
| F5-TTS / OmniVoice / Qwen3-TTS | Supports Voice Cloning | |
| GPT-SoVITS / Index-TTS / ChatTTS | High-quality open-source TTS, requires local deployment | |
| 302.AI / OpenAI / Azure / ElevenLabs | High-quality commercial API |
Documentation & Support
- Official Documentation: https://pyvideotrans.com (Includes detailed tutorials, API configuration guides, FAQ)
- Online Q&A Community: https://bbs.pyvideotrans.com (Submit error logs for automated AI analysis and answers)
- GitHub Wiki: architecture.md | Add new Translator Channel | cli.md | webui.md | Synchronize.md | faq.md
Disclaimer
This software is an open-source, free, non-commercial project. Users are solely responsible for any legal consequences arising from the use of this software (including but not limited to calling third-party APIs or processing copyrighted video content). Please comply with local laws and regulations and the terms of use of relevant service providers.
Acknowledgements
This project mainly relies on the following open-source projects (partial):
- FFmpeg
- PySide6
- sherpa-onnx
- faster-whisper
- openai-whisper
- edge-tts
- F5-TTS
- Confucius4-TTS
- OmniVoice
- CosyVoice
- Gradio (WebUI)
Created by jianchang512