Merge branch 'SWivid:main' into main

This commit is contained in:
Rino
2024-11-01 13:11:20 +07:00
committed by GitHub

View File

@@ -161,6 +161,8 @@ def main_process(ref_audio, ref_text, text_gen, model_obj, remove_silence, speed
chunks = re.split(reg1, text_gen)
reg2 = r"\[(\w+)\]"
for text in chunks:
if not text.strip():
continue
match = re.match(reg2, text)
if match:
voice = match[1]