From 95bb2c921e857971d72b0118fd4f65691fd594a6 Mon Sep 17 00:00:00 2001 From: c4fun Date: Fri, 19 Jan 2024 20:49:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=BE=93=E5=85=A5=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E6=96=87=E6=9C=AC=E7=9A=84=E7=A9=BA=E8=A1=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GPT_SoVITS/inference_webui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPT_SoVITS/inference_webui.py b/GPT_SoVITS/inference_webui.py index 7920d60..e5e604f 100644 --- a/GPT_SoVITS/inference_webui.py +++ b/GPT_SoVITS/inference_webui.py @@ -175,6 +175,9 @@ def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language) dtype=np.float16 if is_half == True else np.float32, ) for text in texts: + # 解决输入目标文本的空行导致报错的问题 + if (len(text.strip()) == 0): + continue phones2, word2ph2, norm_text2 = clean_text(text, text_language) phones2 = cleaned_text_to_sequence(phones2) if prompt_language == "zh":