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}")