Update
This commit is contained in:
@@ -19,4 +19,5 @@ COPY --chown=user . $HOME/app
|
|||||||
|
|
||||||
RUN pip install --no-cache-dir -r $HOME/app/requirements.txt
|
RUN pip install --no-cache-dir -r $HOME/app/requirements.txt
|
||||||
|
|
||||||
CMD ["python", "server_editor.py"]
|
# 必要に応じて制限を変更してください
|
||||||
|
CMD ["python", "server_editor.py", "--line_length", "50", "--line_count", "3"]
|
||||||
|
|||||||
11
Editor.bat
Normal file
11
Editor.bat
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
chcp 65001 > NUL
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
pushd %~dp0
|
||||||
|
echo Running server_editor.py --inbroser
|
||||||
|
venv\Scripts\python server_editor.py --inbrowser
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
popd
|
||||||
|
pause
|
||||||
@@ -6,8 +6,7 @@ GRADIO_THEME: str = "NoCrypt/miku"
|
|||||||
|
|
||||||
LATEST_VERSION: str = "2.3"
|
LATEST_VERSION: str = "2.3"
|
||||||
|
|
||||||
USER_DICT_CSV_PATH: str = "dict/user_dict.csv"
|
USER_DICT_DIR = "dict_data"
|
||||||
USER_DICT_PATH: str = "dict/user.dic"
|
|
||||||
|
|
||||||
DEFAULT_STYLE: str = "Neutral"
|
DEFAULT_STYLE: str = "Neutral"
|
||||||
DEFAULT_STYLE_WEIGHT: float = 5.0
|
DEFAULT_STYLE_WEIGHT: float = 5.0
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ python slice.py --model_name Foo -i /notebooks/inputs
|
|||||||
python transcribe.py --model_name Foo
|
python transcribe.py --model_name Foo
|
||||||
```
|
```
|
||||||
|
|
||||||
それが終わったら、以下のコマンドで一括前処理を行う(パラメータは各自お好み、バッチサイズ6でVRAM 16GBギリくらい)。
|
それが終わったら、以下のコマンドで一括前処理を行う(パラメータは各自お好み、バッチサイズ5か6でVRAM 16GBギリくらい)。
|
||||||
```bash
|
```bash
|
||||||
python preprocess_all.py --model_name Foo -b 6 -e 300 --use_jp_extra
|
python preprocess_all.py --model_name Foo -b 5 -e 300 --use_jp_extra
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. 学習
|
### 3. 学習
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ pushd Style-Bert-VITS2
|
|||||||
python initialize.py
|
python initialize.py
|
||||||
|
|
||||||
echo ----------------------------------------
|
echo ----------------------------------------
|
||||||
echo Model download is complete. Start the WebUI of the voice synthesis.
|
echo Model download is complete. Start Style-Bert-VITS2 Editor.
|
||||||
echo ----------------------------------------
|
echo ----------------------------------------
|
||||||
|
|
||||||
@REM 音声合成WebUIの起動
|
@REM エディターの起動
|
||||||
python app.py
|
python server_editor.py --inbrowser
|
||||||
|
|
||||||
pause
|
pause
|
||||||
|
|
||||||
|
|||||||
@@ -58,11 +58,11 @@ pushd Style-Bert-VITS2
|
|||||||
python initialize.py
|
python initialize.py
|
||||||
|
|
||||||
echo ----------------------------------------
|
echo ----------------------------------------
|
||||||
echo Model download is complete. Start the WebUI of the voice synthesis.
|
echo Model download is complete. Start Style-Bert-VITS2 Editor.
|
||||||
echo ----------------------------------------
|
echo ----------------------------------------
|
||||||
|
|
||||||
@REM 音声合成WebUIの起動
|
@REM エディターの起動
|
||||||
python app.py
|
python server_editor.py --inbrowser
|
||||||
|
|
||||||
pause
|
pause
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if not exist %CURL_CMD% (
|
|||||||
|
|
||||||
@REM Style-Bert-VITS2.zip をGitHubのmasterの最新のものをダウンロード
|
@REM Style-Bert-VITS2.zip をGitHubのmasterの最新のものをダウンロード
|
||||||
%CURL_CMD% -Lo Style-Bert-VITS2.zip^
|
%CURL_CMD% -Lo Style-Bert-VITS2.zip^
|
||||||
https://github.com/litagin02/Style-Bert-VITS2/archive/refs/heads/master.zip
|
https://github.com/litagin02/Style-Bert-VITS2/archive/refs/heads/dev.zip
|
||||||
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
@REM Style-Bert-VITS2.zip を解凍(フォルダ名前がBert-VITS2-masterになる)
|
@REM Style-Bert-VITS2.zip を解凍(フォルダ名前がBert-VITS2-masterになる)
|
||||||
@@ -24,8 +24,8 @@ del Style-Bert-VITS2.zip
|
|||||||
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
@REM Bert-VITS2-masterの中身をStyle-Bert-VITS2に上書き移動
|
@REM Bert-VITS2-masterの中身をStyle-Bert-VITS2に上書き移動
|
||||||
xcopy /QSY .\Style-Bert-VITS2-master\ .\Style-Bert-VITS2\
|
xcopy /QSY .\Style-Bert-VITS2-dev\ .\Style-Bert-VITS2\
|
||||||
rmdir /s /q Style-Bert-VITS2-master
|
rmdir /s /q Style-Bert-VITS2-dev
|
||||||
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
@REM 仮想環境のpip requirements.txtを更新
|
@REM 仮想環境のpip requirements.txtを更新
|
||||||
@@ -34,17 +34,19 @@ echo call .\Style-Bert-VITS2\scripts\activate.bat
|
|||||||
call .\Style-Bert-VITS2\venv\Scripts\activate.bat
|
call .\Style-Bert-VITS2\venv\Scripts\activate.bat
|
||||||
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
pause
|
||||||
|
|
||||||
@REM pyopenjtalk-prebuiltやpyopenjtalkが入っていたら削除
|
@REM pyopenjtalk-prebuiltやpyopenjtalkが入っていたら削除
|
||||||
echo pip uninstall -y pyopenjtalk-prebuilt pyopenjtalk
|
echo python -m pip uninstall -y pyopenjtalk-prebuilt pyopenjtalk
|
||||||
pip uninstall -y pyopenjtalk-prebuilt pyopenjtalk
|
python -m pip uninstall -y pyopenjtalk-prebuilt pyopenjtalk
|
||||||
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
@REM pyopenjtalk-dictをインストール
|
@REM pyopenjtalk-dictをインストール
|
||||||
echo pip install -U pyopenjtalk-dict
|
echo python -m pip install -U pyopenjtalk-dict
|
||||||
pip install -U pyopenjtalk-dict
|
python -m pip install -U pyopenjtalk-dict
|
||||||
|
|
||||||
@REM その他のrequirements.txtも一応更新
|
@REM その他のrequirements.txtも一応更新
|
||||||
pip install -U -r Style-Bert-VITS2\requirements.txt
|
python -m pip install -U -r Style-Bert-VITS2\requirements.txt
|
||||||
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
pushd Style-Bert-VITS2
|
pushd Style-Bert-VITS2
|
||||||
@@ -52,7 +54,7 @@ pushd Style-Bert-VITS2
|
|||||||
echo Update completed. Running Style-Bert-VITS2 Editor...
|
echo Update completed. Running Style-Bert-VITS2 Editor...
|
||||||
|
|
||||||
@REM Style-Bert-VITS2 Editorを起動
|
@REM Style-Bert-VITS2 Editorを起動
|
||||||
python server_editor.py
|
python server_editor.py --inbrowser
|
||||||
|
|
||||||
pause
|
pause
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,15 @@ echo call .\Style-Bert-VITS2\scripts\activate.bat
|
|||||||
call .\Style-Bert-VITS2\venv\Scripts\activate.bat
|
call .\Style-Bert-VITS2\venv\Scripts\activate.bat
|
||||||
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
echo pip uninstall -y pyopenjtalk-prebuilt pyopenjtalk
|
||||||
|
pip uninstall -y pyopenjtalk-prebuilt pyopenjtalk
|
||||||
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
echo pip install -U pyopenjtalk-dict
|
||||||
|
pip install -U pyopenjtalk-dict
|
||||||
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
echo pip install -U -r Style-Bert-VITS2\requirements.txt
|
||||||
pip install -U -r Style-Bert-VITS2\requirements.txt
|
pip install -U -r Style-Bert-VITS2\requirements.txt
|
||||||
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
if %errorlevel% neq 0 ( pause & popd & exit /b %errorlevel% )
|
||||||
|
|
||||||
|
|||||||
@@ -78,12 +78,9 @@ if __name__ == "__main__":
|
|||||||
language_id = Languages.ZH.value
|
language_id = Languages.ZH.value
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"{language} is not supported.")
|
raise ValueError(f"{language} is not supported.")
|
||||||
with open(output_file, "w", encoding="utf-8") as f:
|
|
||||||
for wav_file in tqdm(wav_files, file=SAFE_STDOUT):
|
for wav_file in tqdm(wav_files, file=SAFE_STDOUT):
|
||||||
file_name = os.path.basename(wav_file)
|
file_name = os.path.basename(wav_file)
|
||||||
text = transcribe(
|
text = transcribe(wav_file, initial_prompt=initial_prompt, language=language)
|
||||||
wav_file, initial_prompt=initial_prompt, language=language
|
with open(output_file, "a", encoding="utf-8") as f:
|
||||||
)
|
|
||||||
f.write(f"{file_name}|{model_name}|{language_id}|{text}\n")
|
f.write(f"{file_name}|{model_name}|{language_id}|{text}\n")
|
||||||
f.flush()
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user