Skip to content

Commit

Permalink
Client Improvement
Browse files Browse the repository at this point in the history
1. [GUI] Make the guidance feature permanent (in the upper-right corner of the Tools page) so that it can be viewed at any time.
2. [GUI] Simplify TTS param options (including GPT-SoVITS&VITS2)
3. [Core] Fix the issue that GPT-SoVITS had to reload models for each inference
4. [Core] Merge source code from the latest version of GPT-SoVITS
  • Loading branch information
Spr-Aachen committed Jun 20, 2024
1 parent 31c7108 commit 1d7fe6d
Show file tree
Hide file tree
Showing 8 changed files with 1,277 additions and 1,787 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
**/GPT_SoVITS/GPT_SoVITS/pretrained_models/
**/GPT_SoVITS/GPT_SoVITS/text/
**/GPT_SoVITS/GPT_SoVITS/tools/i18n/locale/
**/GPT_SoVITS/GPT_SoVITS/inference_webui.py
**/GPT_SoVITS/GPT_SoVITS/my_utils.py
**/GPT_SoVITS/GPT_SoVITS/onnx_export.py
**/GPT_SoVITS/GPT_SoVITS/process_ckpt.py
Expand Down
28 changes: 16 additions & 12 deletions EVT_Core/TTS/GPT_SoVITS/Convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def change_tts_inference(
gpu_number,
is_half,
gpt_path,
sovits_path
sovits_path,
use_webui
):
global p_tts_inference
if(if_tts==True and p_tts_inference==None):
Expand All @@ -122,7 +123,8 @@ def change_tts_inference(
os.environ["is_half"]=str(is_half)
os.environ["infer_ttswebui"]=str(webui_port_infer_tts)
os.environ["is_share"]=str(is_share)
cmd = f'"{python_exec}" "GPT_SoVITS/inference_webui.py"'
os.environ['USE_WEBUI']=str(use_webui)
cmd = f'"{python_exec}" "GPT_SoVITS/inference.py"'
print("TTS推理进程已开启")
print(cmd)
p_tts_inference = subprocess.Popen(cmd, shell=True)
Expand Down Expand Up @@ -153,16 +155,17 @@ def Convert(
Use_WebUI: bool = False
):
# 1C-推理
if Use_WebUI:
change_tts_inference(
if_tts = True,
bert_path = Model_Dir_Load_bert,
cnhubert_base_path = Model_Dir_Load_ssl,
gpu_number = gpus,
is_half = Set_FP16_Run,
gpt_path = Model_Path_Load_s1,
sovits_path = Model_Path_Load_s2G
)
change_tts_inference(
if_tts = True,
bert_path = Model_Dir_Load_bert,
cnhubert_base_path = Model_Dir_Load_ssl,
gpu_number = gpus,
is_half = Set_FP16_Run,
gpt_path = Model_Path_Load_s1,
sovits_path = Model_Path_Load_s2G,
use_webui = Use_WebUI
)
'''
else:
os.environ["gpt_path"] = Model_Path_Load_s1
os.environ["sovits_path"] = Model_Path_Load_s2G
Expand Down Expand Up @@ -194,5 +197,6 @@ def Convert(
SR, Audio = list(TTS_Result)[-1]
write(Audio_Path_Save, SR, Audio)
'''

# 2-GPT-SoVITS-变声
Loading

0 comments on commit 1d7fe6d

Please sign in to comment.