mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
标记点完善
This commit is contained in:
parent
4aefbe5aa8
commit
8c327f192c
1 changed files with 3 additions and 3 deletions
|
|
@ -266,7 +266,7 @@ class ConnectionHandler:
|
|||
current_text = full_text[processed_chars:] # 从未处理的位置开始
|
||||
|
||||
# 查找最后一个有效标点
|
||||
punctuations = ("。", "?", "!", ";", ":")
|
||||
punctuations = ("。", "?", "!", ";", ":",",",",","~")
|
||||
last_punct_pos = -1
|
||||
for punct in punctuations:
|
||||
pos = current_text.rfind(punct)
|
||||
|
|
@ -382,7 +382,7 @@ class ConnectionHandler:
|
|||
current_text = full_text[processed_chars:] # 从未处理的位置开始
|
||||
|
||||
# 查找最后一个有效标点
|
||||
punctuations = ("。", "?", "!", ";", ":")
|
||||
punctuations = ("。", "?", "!", ";", ":",",",",","~")
|
||||
last_punct_pos = -1
|
||||
for punct in punctuations:
|
||||
pos = current_text.rfind(punct)
|
||||
|
|
@ -589,4 +589,4 @@ class ConnectionHandler:
|
|||
# After chat is complete, close the connection
|
||||
self.close_after_chat = True
|
||||
except Exception as e:
|
||||
self.logger.bind(tag=TAG).error(f"Chat and close error: {str(e)}")
|
||||
self.logger.bind(tag=TAG).error(f"Chat and close error: {str(e)}")
|
||||
Loading…
Reference in a new issue