mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
fix is_segment for tts
This commit is contained in:
parent
ef84fa1746
commit
a2d51131fd
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue