-
Notifications
You must be signed in to change notification settings - Fork 0
/
voicevox_startup.bat
44 lines (29 loc) · 1.17 KB
/
voicevox_startup.bat
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
@echo off
setlocal
REM Get the current directory of the batch file
set "SCRIPT_DIR=%~dp0"
REM Set the log file path
set "LOG_FILE=%SCRIPT_DIR%\voicevox_log.txt"
REM Change to the script directory
cd /d "%SCRIPT_DIR%"
REM Create and activate the main virtual environment
python -m venv venv
call venv\Scripts\activate
REM Install PyTorch, torchvision, and torchaudio from a specific index URL
REM python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 2>> "%LOG_FILE%"
REM Install openai-whisper from the GitHub repository
REM python -m pip install git+https://github.com/openai/whisper.git 2>> "%LOG_FILE%"
REM Install Playwright
REM python -m playwright install 2>> "%LOG_FILE%"
REM Install the remaining dependencies from requirements.txt
REM python -m pip install -r requirements.txt 2>> "%LOG_FILE%"
REM Start main.py in the background
start /B python main.py
start /B python "%SCRIPT_DIR%\API\voice_vox_api.py"
REM Deactivate the virtual environment
deactivate
REM Display message and prompt user to exit
echo.
echo Batch file execution completed. Press any key to exit.
pause >nul
endlocal