guoyu/Test/python/install_whisper.bat
2025-12-11 23:28:07 +08:00

35 lines
1.0 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
REM Whisper 服务依赖安装脚本Windows 服务器)
REM 使用清华大学镜像源加速
echo ======================================
echo 安装 Whisper 语音识别服务依赖
echo ======================================
echo.
REM 1. 配置 pip 使用清华镜像
echo [1/4] 配置 pip 镜像源...
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
REM 2. 升级 pip
echo [2/4] 升级 pip...
python -m pip install --upgrade pip
REM 3. 安装基础依赖
echo [3/4] 安装 Flask 相关依赖...
pip install flask==2.3.0 flask-cors==4.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
REM 4. 安装 Whisper
echo [4/4] 安装 openai-whisper可能需要几分钟...
pip install openai-whisper -i https://pypi.tuna.tsinghua.edu.cn/simple
echo.
echo ✅ 依赖安装完成!
echo.
echo 📝 后续步骤:
echo 1. 首次运行会自动下载 Whisper 模型(约 140MB
echo 2. 启动服务python whisper_server.py
echo 3. 访问http://服务器IP:5001/health
echo.
pause