fix address #348

This commit is contained in:
SWivid
2024-11-01 14:09:41 +08:00
parent dee0420b59
commit 7a6fb0eb4e

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]