mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 08:33:53 +08:00
fix: 停止帧发送后与原先音频时序问题
回退退出工具打断处理(在大模型思考期间进行打断,然后大模型立马调用退出工具会造成死锁,因模型思考时间和是否调用工具不确定性,状态难管理)
This commit is contained in:
@@ -33,10 +33,6 @@ async def handle_user_intent(conn: "ConnectionHandler", text):
|
||||
if await check_direct_exit(conn, filtered_text):
|
||||
return True
|
||||
|
||||
# 明确再见不被打断
|
||||
if conn.is_exiting:
|
||||
return True
|
||||
|
||||
# 检查是否是唤醒词
|
||||
if await checkWakeupWords(conn, filtered_text):
|
||||
return True
|
||||
@@ -62,7 +58,6 @@ async def check_direct_exit(conn: "ConnectionHandler", text):
|
||||
if text == cmd:
|
||||
conn.logger.bind(tag=TAG).info(f"识别到明确的退出命令: {text}")
|
||||
await send_stt_message(conn, text)
|
||||
conn.is_exiting = True
|
||||
await conn.close()
|
||||
return True
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user