Skip to content

Source Code Deployment

It is recommended to install using uv. If you don't have uv yet, please check the official installation guide

Windows users can also refer to this method to install uv and ffmpeg

  1. Pre-installation tools for MacOS/Linux

    MacOS needs to run the following commands to install the required libraries

    brew install libsndfile
    
    brew install ffmpeg
    
    brew install git
    
    brew install [email protected]

    Linux needs to install ffmpeg, using the command sudo yum install -y ffmpeg or apt-get install ffmpeg

  2. Create a folder without spaces or Chinese characters, enter this folder in the terminal, and then run the command in the terminal

    git clone https://github.com/jianchang512/pyvideotrans
    cd pyvideotrans

    Alternatively, you can directly visit https://github.com/jianchang512/pyvideotrans, click the green Code button to download the source code, and after extracting, navigate to the directory containing sp.py

  3. Run the command uv sync to install the modules. Depending on your network conditions, this may take a few minutes to over ten minutes. Users in mainland China can use a mirror for faster installation with the command: uv sync --index https://mirrors.aliyun.com/pypi/simple/

By default, local channels qwen-tts, qwen-asr, moss-tts, and chatterbox are not installed. If needed, run uv sync --all-extra

  1. Run the command uv run sp.py to open the software interface

Notes on Source Code Deployment

  1. The default installation uses ctranslate2 version 4.x, which only supports CUDA 12.x. If your CUDA version is lower than 12 and you cannot upgrade to CUDA 12.x, run the following commands to uninstall ctranslate2 and then reinstall it.

uv remove ctranslate2

uv add ctranslate2==3.24.0