forked from ekwek1/soprano
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
81 lines (64 loc) · 2.23 KB
/
setup.bat
File metadata and controls
81 lines (64 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@echo off
title Soprano TTS Setup
color 0A
echo ================================================
echo SOPRANO TTS SETUP
echo ================================================
echo.
echo This script will:
echo 1. Install the Soprano TTS package
echo 2. Install/fix PyTorch with CUDA support
echo 3. Verify the installation
echo.
echo Press any key to continue or Ctrl+C to cancel...
pause >nul
echo.
echo Installing required dependencies...
echo.
REM Install all required packages
pip install fastapi huggingface_hub lmdeploy numpy scipy unidecode inflect sounddevice uvicorn gradio pyaudio
if %errorlevel% neq 0 (
echo Error occurred during dependency installation. Attempting to continue...
)
echo.
echo Installing Soprano TTS package...
echo.
REM Install the package in editable mode
pip install -e .
if %errorlevel% neq 0 (
echo Error occurred during installation. Attempting to fix...
goto fix_pytorch
)
echo.
echo Installing PyTorch with CUDA support...
echo.
:fix_pytorch
REM Uninstall current PyTorch
pip uninstall -y torch torchvision torchaudio
REM Install PyTorch with CUDA 12.8 support
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
if %errorlevel% neq 0 (
echo Warning: PyTorch CUDA 12.8 installation failed. Installing CUDA 12.6 version...
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu126
)
if %errorlevel% neq 0 (
echo Warning: PyTorch CUDA installation failed. Installing CPU version...
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cpu
)
echo.
echo Verifying installation...
echo.
REM Test the installation
python -c "import soprano; from soprano import SopranoTTS; print('Soprano TTS imported successfully'); print('Installation verified successfully!')"
if %errorlevel% neq 0 (
echo Warning: Verification failed, but installation may still be OK.
)
echo.
echo ================================================
echo Setup completed!
echo.
echo To use Soprano TTS:
echo - Run start_soprano.bat to access the main menu
echo - Or run individual components as needed
echo ================================================
pause