pyvideotrans

jianchang512GPL-3.0活跃维护

把视频从一种语言翻译成另一种语言,自动生成配音和字幕并嵌入视频,适合做视频本地化和跨语言内容分发。

Translate the video from one language to another and embed dubbing & subtitles.

v4.18发布于 2026-11-05 14:17 UTC19,697star +29 / 7 天2,444fork同步于 2026-11-10 23:26 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/jianchang512/pyvideotrans.git
cd pyvideotrans
uv sync
uv run sp.py
硬件要求按 README 说明

README 未给出具体显存要求;NVIDIA GPU 加速需 CUDA 12.8 与 cuDNN 9.11,AMD GPU 可通过 Whisper.NET 加速,未装 GPU 时可走 CPU 版本 PyTorch。

需要 CUDA有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源视频翻译工具,一条龙完成语音识别、字幕翻译、AI配音与音视频合成

把视频从一种语言翻译成另一种语言,自动生成配音和字幕并嵌入视频,适合做视频本地化和跨语言内容分发。

核心能力

  • 一键串联 ASR、字幕翻译、TTS 与视频合成全流程
  • 支持说话人分离,为不同角色分配不同配音音色
  • 集成 F5-TTS、CosyVoice、GPT-SoVITS 实现零样本声音克隆
  • 可暂停并人工校对识别、翻译、配音各阶段结果
  • 提供 CLI 无头运行与 WebUI 浏览器访问两种方式

容易踩的坑

源码部署前必须安装 FFmpeg 并配置到环境变量,否则无法运行;默认不安装 whisper.net 和 WebUI,需分别加 --extra dotnet、--extra webui;Windows 预打包版需解压到不含中文和空格的路径,且不能直接在压缩包内运行。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v4.18
  1. v4.18windows-v4.18最新正式版2026-11-05 · 2026-11-05 14:17 UTC

    v4.18 Win10/11 预打包版本下载

    1. 安装依赖:

      # 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
      
    2. 安装 uv:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      
    3. 克隆并启动:

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

    v4.18 完整包下载(2.7G)

    v4.18 补丁包下载(400MB)

    补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。


    • 解压7z压缩包,解压后,找到 sp.exe 文件,双击即可启动软件,不可在压缩包内双击运行。
    • 不要将软件解压到桌面或 C 盘的 Program Files 等需要管理员权限的文件夹下。
    • 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
    • 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压

    v4.14 完整包下载(2.7G)

    v4.03 完整包下载(2.7G)


    What's Changed

  2. v4.17windows-v4.172026-10-23 · 2026-10-23 06:42 UTC
    查看更新说明

    v4.17 Win10/11 预打包版本下载

    1. 安装依赖:

      # 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
      
    2. 安装 uv:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      
    3. 克隆并启动:

      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

    Full Changelog: https://github.com/jianchang512/pyvideotrans/compare/v4.16...v4.17

    v4.17 完整包下载(2.7G)

    v4.17 补丁包下载(400MB)

    补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。


    • 解压7z压缩包,解压后,找到 sp.exe 文件,双击即可启动软件,不可在压缩包内双击运行。
    • 不要将软件解压到桌面或 C 盘的 Program Files 等需要管理员权限的文件夹下。
    • 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
    • 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压

    v4.16 完整包下载(2.7G)

    v4.14 完整包下载(2.7G)

    v4.03 完整包下载(2.7G)


    New Contributors

  3. v4.16windows-v4.162026-10-13 · 2026-10-13 06:06 UTC
    查看更新说明

    v4.16 Win10/11 预打包版本下载

    1. 安装依赖:

      # 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
      
    2. 安装 uv:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      
    3. 克隆并启动:

      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

    Full Changelog: https://github.com/jianchang512/pyvideotrans/compare/v4.15...v4.16


    v4.16 完整包下载(2.7G)

    v4.16 补丁包下载(390MB)

    补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。


    • 解压7z压缩包,解压后,找到 sp.exe 文件,双击即可启动软件,不可在压缩包内双击运行。
    • 不要将软件解压到桌面或 C 盘的 Program Files 等需要管理员权限的文件夹下。
    • 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
    • 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压

    v4.14 完整包下载(2.7G)

    v4.03 完整包下载(2.7G)


  4. v4.15windows-v4.152026-10-04 · 2026-10-04 05:13 UTC
    查看更新说明

    v4.15 Win10/11 预打包版本下载

    1. 安装依赖:

      # 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
      
    2. 安装 uv:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      
    3. 克隆并启动:

      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

    New Contributors

    Full Changelog: https://github.com/jianchang512/pyvideotrans/compare/v4.14...v4.15


    v4.15 完整包下载(2.7G)

    v4.15 补丁包下载(390MB)

    补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。


    • 解压7z压缩包,解压后,找到 sp.exe 文件,双击即可启动软件,不可在压缩包内双击运行。
    • 不要将软件解压到桌面或 C 盘的 Program Files 等需要管理员权限的文件夹下。
    • 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
    • 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压

    v4.14 完整包下载(2.7G)

    v4.03 完整包下载(2.7G)


  5. v4.14windows-v4.142026-09-26 · 2026-09-26 05:13 UTC
    查看更新说明

    v4.14 Win10/11 预打包版本下载

    1. 安装依赖:

      # 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
      
    2. 安装 uv:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      
    3. 克隆并启动:

      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)

    v4.14 补丁包下载(360MB)

    补丁包不可单独使用,仅用于覆盖旧包, 如果版本相差较多,请直接下载完整包,勿使用补丁包。覆盖后如果闪退或报错,请下载完整包。


    • 解压7z压缩包,解压后,找到 sp.exe 文件,双击即可启动软件,不可在压缩包内双击运行。
    • 不要将软件解压到桌面或 C 盘的 Program Files 等需要管理员权限的文件夹下。
    • 避免路径错误: 解压路径中不要包含中文、空格或特殊符号。
    • 如果使用7zip软件解压提示错误,请尝试使用 Bandizip 或 360压缩软件 进行解压

    v4.13 完整包下载(2.7G)

    v4.12 完整包下载(2.7G)

    v4.03 完整包下载(2.7G)


    What's Changed

    New Contributors

    Full Changelog: https://github.com/jianchang512/pyvideotrans/compare/v4.13...v4.14

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    pyVideoTrans

    Sponsors
    Recall.ai Meeting Transcription APIIf 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 APIsAccess 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

    License Python Platform

    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

    Technical Architecture and Principles

    • 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.

    1. Download: Click to download the latest pre-packaged version
    2. Unzip: Extract the compressed file to a path without Chinese characters or spaces (e.g., D:\pyVideoTrans).
    3. Run: Double-click sp.exe inside 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.exe and ffprobe.exe directly 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.net and WebUI are 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"
    

    CLI documentation with all parameters

    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
    

    WebUI documentation

    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
    

    AMD GPU acceleration via Whisper.NET


    Supported Channels & Models (Partial)

    CategoryChannel/ModelDescription
    ASR (Speech Recognition)Faster-Whisper (Local)Recommended, fast speed, high accuracy
    WhisperX / ParakeetSupports timestamp alignment & speaker diarization
    Alibaba Qwen3-ASR / ByteDance VolcanoOnline API, excellent for Chinese
    Translation (LLM/MT)DeepSeek / OpenAIChatGPTSupports context understanding, more natural translation
    MiniMax/Zhipu/Xiaomi/Geminilatest flagship model, OpenAI-compatible
    Google / MicrosoftTraditional machine translation, fast speed
    HY-MT2 / M2M100Fully local offline translation
    TTS (Speech Synthesis)Edge-TTSMicrosoft free interface, natural effect
    F5-TTS / OmniVoice / Qwen3-TTSSupports Voice Cloning
    GPT-SoVITS / Index-TTS / ChatTTSHigh-quality open-source TTS, requires local deployment
    302.AI / OpenAI / Azure / ElevenLabsHigh-quality commercial API

    Documentation & Support

    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):


    Created by jianchang512