From e6381c617687df7ff686eb7146af6b15a455868f Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Sat, 15 Feb 2025 11:48:02 +0800 Subject: [PATCH] =?UTF-8?q?update:=E5=8E=BB=E6=8E=89=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/handle/audioHandle.py | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/core/handle/audioHandle.py b/core/handle/audioHandle.py index 0a5b130f..cce6612f 100644 --- a/core/handle/audioHandle.py +++ b/core/handle/audioHandle.py @@ -37,28 +37,6 @@ async def handleAudioMessage(conn, audio): conn.asr_audio.clear() conn.reset_vad_states() -async def handleCMDMessage(conn, text): - cmd_exit = conn.cmd_exit - for cmd in cmd_exit: - if text == cmd: - logger.info("识别到明确的退出命令".format(text)) - await finishToChat(conn) - return True - return False - -async def finishToChat(conn): - await conn.close() - -async def isLLMWantToFinsih(conn): - first_text = conn.tts_first_text - last_text = conn.tts_last_text - _, last_text_without_punctuation = remove_punctuation_and_length(last_text) - if "再见" in last_text_without_punctuation or "拜拜" in last_text_without_punctuation: - return True - _, first_text_without_punctuation = remove_punctuation_and_length(first_text) - if "再见" in first_text_without_punctuation or "拜拜" in first_text_without_punctuation: - return True - return False async def handleCMDMessage(conn, text): cmd_exit = conn.cmd_exit @@ -167,4 +145,4 @@ async def schedule_with_interrupt(delay, coro): await asyncio.sleep(delay) await coro except asyncio.CancelledError: - pass \ No newline at end of file + pass