|
chcp 65001 > NUL |
|
@echo off |
|
|
|
|
|
|
|
pushd %~dp0 |
|
set PS_CMD=PowerShell -Version 5.1 -ExecutionPolicy Bypass |
|
|
|
set CURL_CMD=C:\Windows\System32\curl.exe |
|
if not exist %CURL_CMD% ( |
|
echo [ERROR] %CURL_CMD% が見つかりません。 |
|
pause & popd & exit /b 1 |
|
) |
|
|
|
|
|
if not exist lib\ ( mkdir lib ) |
|
|
|
|
|
%CURL_CMD% -Lo Style-Bert-VITS2.zip^ |
|
https://github.com/litagin02/Style-Bert-VITS2/archive/refs/heads/master.zip |
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) |
|
|
|
|
|
%PS_CMD% Expand-Archive -Path Style-Bert-VITS2.zip -DestinationPath . -Force |
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) |
|
|
|
|
|
del Style-Bert-VITS2.zip |
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) |
|
|
|
|
|
xcopy /QSY .\Style-Bert-VITS2-master\ .\Style-Bert-VITS2\ |
|
rmdir /s /q Style-Bert-VITS2-master |
|
|
|
echo ---------------------------------------- |
|
echo Setup Python and Virtual Environment |
|
echo ---------------------------------------- |
|
|
|
|
|
call Style-Bert-VITS2\scripts\Setup-Python.bat ..\..\lib\python ..\venv |
|
if %errorlevel% neq 0 ( popd & exit /b %errorlevel% ) |
|
|
|
|
|
pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118 |
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) |
|
|
|
pip install -r Style-Bert-VITS2\requirements.txt |
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% ) |
|
|
|
echo ---------------------------------------- |
|
echo Environment setup is complete. Start downloading the model. |
|
echo ---------------------------------------- |
|
|
|
|
|
pushd Style-Bert-VITS2 |
|
|
|
|
|
python initialize.py |
|
|
|
echo ---------------------------------------- |
|
echo Model download is complete. Start the WebUI of the voice synthesis. |
|
echo ---------------------------------------- |
|
|
|
|
|
python app.py |
|
|
|
pause |
|
|
|
popd |
|
|
|
popd |
|
|
|
|