From 90ac306d048e4556ac0d1bee04af17d4685138e7 Mon Sep 17 00:00:00 2001 From: leechedan Date: Thu, 13 Mar 2025 16:12:03 +0800 Subject: [PATCH] style: revert textHandle.py --- main/xiaozhi-server/core/handle/textHandle.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/main/xiaozhi-server/core/handle/textHandle.py b/main/xiaozhi-server/core/handle/textHandle.py index 5feb1e96e..06fa6b7c7 100644 --- a/main/xiaozhi-server/core/handle/textHandle.py +++ b/main/xiaozhi-server/core/handle/textHandle.py @@ -37,17 +37,7 @@ async def handleTextMessage(conn, message): conn.client_have_voice = False conn.asr_audio.clear() if "text" in msg_json: - text = msg_json["text"] - text_len, text_without_punctuation = remove_punctuation_and_length(text) - if await conn.music_handler.handle_music_command(conn, text_without_punctuation): - conn.asr_server_receive = True - conn.asr_audio.clear() - return - # if text_len <= conn.max_cmd_length and await handleCMDMessage(conn, text_without_punctuation): - # return - if text_len > 0: - await startToChat(conn, text) - #await startToChat(conn, msg_json["text"]) + await startToChat(conn, msg_json["text"]) elif msg_json["type"] == "iot": if "descriptors" in msg_json: await handleIotDescriptors(conn, msg_json["descriptors"]) @@ -55,5 +45,3 @@ async def handleTextMessage(conn, message): await handleIotStatus(conn, msg_json["states"]) except json.JSONDecodeError: await conn.websocket.send(message) - -