mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 07:02:57 +08:00
fix cut
This commit is contained in:
parent
bdb5d710f8
commit
96b475a6fb
@ -490,8 +490,9 @@ def merge_fragments(sentences_list):
|
||||
|
||||
prev_list = None
|
||||
for sublist in sentences_list:
|
||||
if len(sublist) == 1 and len(sublist[0]['text']) < 2 and prev_list is not None:
|
||||
prev_list.extend(sublist)
|
||||
if len(sublist) == 1 and len(sublist[0]['text']) < 2:
|
||||
if prev_list is not None:
|
||||
prev_list.extend(sublist)
|
||||
else:
|
||||
new_sentences_list.append(sublist)
|
||||
prev_list = sublist
|
||||
@ -569,6 +570,8 @@ def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language,
|
||||
texts = cut4(texts)
|
||||
elif (how_to_cut == i18n("按标点符号切")):
|
||||
texts = cut5(texts)
|
||||
else:
|
||||
texts = [texts]
|
||||
|
||||
texts = merge_fragments(texts)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user