Sync from GitHub repo
Browse filesThis Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there
149 unmodified lines150151152153154155156157158159160161162163149 unmodified linesreg2 = r'\[(\w+)\]'for text in chunks:match = re.match(reg2, text)if match:voice = match[1]else:print("No voice tag found, using main.")voice = "main"if voice not in voices:print(f"Voice {voice} not found, using main.")voice = "main"text = re.sub(reg2, "", text)gen_text = text.strip()ref_audio = voices[voice]['ref_audio']149 unmodified lines150151152153154155156157158159149 unmodified linesreg2 = r'\[(\w+)\]'for text in chunks:match = re.match(reg2, text)if not match or voice not in voices:voice = "main"else:voice = match[1]text = re.sub(reg2, "", text)gen_text = text.strip()ref_audio = voices[voice]['ref_audio']
inference-cli.py+3-7