From 5237229d397294cafaf6bc7f0e34220970aab97b Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Fri, 26 Jan 2024 22:56:32 +0800 Subject: [PATCH] Update inference_webui.py --- GPT_SoVITS/inference_webui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPT_SoVITS/inference_webui.py b/GPT_SoVITS/inference_webui.py index d4a817b..5495be5 100644 --- a/GPT_SoVITS/inference_webui.py +++ b/GPT_SoVITS/inference_webui.py @@ -423,6 +423,7 @@ def cut1(inp): def cut2(inp): inp = inp.strip("\n") inps = split(inp) + # print(inps) if len(inps) < 2: return inp opts = [] @@ -437,7 +438,8 @@ def cut2(inp): tmp_str = "" if tmp_str != "": opts.append(tmp_str) - if len(opts[-1]) < 50: ##如果最后一个太短了,和前一个合一起 + # print(opts) + if len(opts)>1 and len(opts[-1]) < 50: ##如果最后一个太短了,和前一个合一起 opts[-2] = opts[-2] + opts[-1] opts = opts[:-1] return "\n".join(opts)