mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-27 03:56:41 +08:00
Update inference_webui.py
This commit is contained in:
parent
e0b1522be4
commit
b4ad6618d0
@ -423,6 +423,7 @@ def cut1(inp):
|
|||||||
def cut2(inp):
|
def cut2(inp):
|
||||||
inp = inp.strip("\n")
|
inp = inp.strip("\n")
|
||||||
inps = split(inp)
|
inps = split(inp)
|
||||||
|
# print(inps)
|
||||||
if len(inps) < 2:
|
if len(inps) < 2:
|
||||||
return inp
|
return inp
|
||||||
opts = []
|
opts = []
|
||||||
@ -437,7 +438,8 @@ def cut2(inp):
|
|||||||
tmp_str = ""
|
tmp_str = ""
|
||||||
if tmp_str != "":
|
if tmp_str != "":
|
||||||
opts.append(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[-2] = opts[-2] + opts[-1]
|
||||||
opts = opts[:-1]
|
opts = opts[:-1]
|
||||||
return "\n".join(opts)
|
return "\n".join(opts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user