From c70a609a313cceaf808044f81531dedb2fffabf2 Mon Sep 17 00:00:00 2001 From: KamioRinn Date: Sat, 17 Feb 2024 16:04:06 +0800 Subject: [PATCH] Adjust ja clean text --- GPT_SoVITS/inference_webui.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GPT_SoVITS/inference_webui.py b/GPT_SoVITS/inference_webui.py index dd8fce3..39ae7e4 100644 --- a/GPT_SoVITS/inference_webui.py +++ b/GPT_SoVITS/inference_webui.py @@ -248,6 +248,10 @@ def clean_text_inf(text, language): formattext = "" language = language.replace("all_","") for tmp in LangSegment.getTexts(text): + if language == "ja": + if tmp["lang"] == language or tmp["lang"] == "zh": + formattext += tmp["text"] + " " + continue if tmp["lang"] == language: formattext += tmp["text"] + " " while " " in formattext: @@ -279,8 +283,6 @@ def nonen_clean_text_inf(text, language): for tmp in LangSegment.getTexts(text): langlist.append(tmp["lang"]) textlist.append(tmp["text"]) - print(textlist) - print(langlist) phones_list = [] word2ph_list = [] norm_text_list = []