From 3436d50b43870144298f8796893264d81f384fe9 Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Mon, 20 Apr 2026 10:40:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E6=9C=89=E6=96=87=E6=9C=AC=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E4=B8=80=E8=87=B4=E7=9A=84=E6=97=B6=E5=80=99=E4=B8=8D?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=90=88=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index dbbed278..b58ede82 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -1114,7 +1114,7 @@ class ConnectionHandler: if len(response_message) > 0: streamed_text = "".join(response_message) self.tts.store_tts_text(current_sentence_id, streamed_text) - self.dialogue.put(Message(role="assistant", content=text_buff)) + self.dialogue.put(Message(role="assistant", content=streamed_text)) response_message.clear() # 收集所有工具调用的 Future @@ -1232,7 +1232,7 @@ class ConnectionHandler: Action.ERROR, ]: text = result.response if result.response else result.result - if streamed_text: + if streamed_text and text in streamed_text: self.logger.bind(tag=TAG).debug( f"Skipping duplicate TTS for tool {tool_call_data['name']}, already streamed" )