guoyu/Test/python/修复Whisper依赖.bat
2025-12-11 23:28:07 +08:00

31 lines
743 B
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
chcp 65001 >nul
echo ========================================
echo 修复 Whisper 依赖问题
echo ========================================
echo.
echo [步骤 1] 卸载现有的 torch
pip uninstall torch torchvision torchaudio -y
echo.
echo [步骤 2] 安装 CPU 版本的 PyTorch
echo 不需要GPU更稳定
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
echo.
echo [步骤 3] 重新安装 Whisper
pip install -U openai-whisper
echo.
echo [步骤 4] 安装其他依赖
pip install flask flask-cors
echo.
echo ========================================
echo 修复完成!
echo.
echo 现在运行: python whisper_server.py
echo ========================================
pause