From 71db92ef616839d98abd286f7322aa3862cc7607 Mon Sep 17 00:00:00 2001 From: lizhongxiang Date: Fri, 11 Apr 2025 11:08:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=92=AD=E6=94=BE=E9=9F=B3=E4=B9=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/connection.py | 4 ++++ main/xiaozhi-server/plugins_func/functions/play_music.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index e2803e3c..0aa85053 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -622,6 +622,10 @@ class ConnectionHandler: self.recode_first_last_text(text, text_index) self.tts.tts_one_sentence(self, text) self.dialogue.put(Message(role="assistant", content=text)) + elif result.action == Action.NONE: + # 啥也不干 + text = result.result + self.dialogue.put(Message(role="assistant", content=text)) else: text = result.result self.recode_first_last_text(text, text_index) diff --git a/main/xiaozhi-server/plugins_func/functions/play_music.py b/main/xiaozhi-server/plugins_func/functions/play_music.py index d0c3ff7e..9be4b15e 100644 --- a/main/xiaozhi-server/plugins_func/functions/play_music.py +++ b/main/xiaozhi-server/plugins_func/functions/play_music.py @@ -67,7 +67,7 @@ def play_music(conn, song_name: str): future.add_done_callback(handle_done) return ActionResponse( - action=Action.RESPONSE, result="指令已接收", response="正在为您播放音乐" + action=Action.NONE, result="指令已接收", response="正在为您播放音乐" ) except Exception as e: logger.bind(tag=TAG).error(f"处理音乐意图错误: {e}")