minor fix for backward compatibility to gradio multistyle feature

This commit is contained in:
SWivid
2025-05-05 02:07:19 +08:00
parent 7c741c05f9
commit 3d969bf78d

View File

@@ -357,6 +357,7 @@ def parse_speechtypes_text(gen_text):
try: # if type dict
current_type_dict = json.loads(type_str)
except json.decoder.JSONDecodeError:
type_str = type_str[1:-1] # remove brace {}
current_type_dict = {"name": type_str, "seed": -1, "speed": 1.0}
return segments