mirror of
https://github.com/SWivid/F5-TTS.git
synced 2026-01-01 15:50:03 -08:00
fix address #348
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user