fix is_segment for tts

This commit is contained in:
fofo 2025-02-17 20:45:29 +08:00
parent ef84fa1746
commit a2d51131fd

View file

@ -35,7 +35,9 @@ def write_json_file(file_path, data):
def is_segment(tokens):
if tokens[-1] in (",", ".", "?", ",", "。", "?", "!", "!", ";", ";", ":", ":"):
if tokens[-1] in (",", ".", "?", ",", "。", "?", "!", "!", ";", ";", ":", ":") and len(tokens) > 5:
return True
elif tokens[-1] in ( ".", "?", "。", "?", "!", "!", ";", ";", ):
return True
else:
return False