#5564 windows如何部署源码

45.67* Posted at: 2 hours ago

windows如何部署源码

1 Replies

要在 Windows 上源码部署 pyVideoTrans,请按以下步骤操作:

  1. 安装前置依赖

    • FFmpeg:下载并将其 bin 目录加入系统环境变量 PATH(或直接放在程序根目录的 ffmpeg/ 下)。
    • Python 3.10:安装并确保 python 命令可用(推荐使用 Miniconda 或官方安装器)。
    • uv:运行 pip install uv 或访问 uv 官网 安装。
    • libsndfile:Windows 通常无需手动安装(打包版已内置),若缺失可下载预编译 DLL 放入 ffmpeg/ 目录。
  2. 克隆仓库并安装依赖
    打开命令提示符(CMD)或 PowerShell,执行:

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

    默认不安装本地 TTS/ASR 可选渠道,如需请追加 --all-extras 或指定单渠道(如 --extra qwentts)。

  3. 启动程序

    uv run sp.py

    等待数秒至分钟,主窗口将出现。

  4. (可选)启用 CUDA 加速
    安装 CUDA 12.8+ 和 cuDNN 9.11+,并确保 nvcc -Vnvidia-smi 正确显示。在软件界面勾选“CUDA 加速”即可。

注意:源码部署不支持 Windows 打包版(.exe)的命令行模式;若需完整离线模型(如 faster-whisper),首次运行会自动下载到 models/ 目录。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update. Dondate: ko-fi.com/jianchang512

Related resource