From 450560f92a152c6dfe94932d75ea34b186a415d9 Mon Sep 17 00:00:00 2001 From: 1cccux <1486990539@qq.com> Date: Mon, 13 Oct 2025 10:57:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=95=BF=E6=8C=89?= =?UTF-8?q?=E8=81=86=E5=90=AC=E8=AE=BE=E5=A4=87=E6=9D=BE=E5=BC=80=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=A3=B0=E9=9F=B3=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/handle/receiveAudioHandle.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main/xiaozhi-server/core/handle/receiveAudioHandle.py b/main/xiaozhi-server/core/handle/receiveAudioHandle.py index 8b635909..f916bb7d 100644 --- a/main/xiaozhi-server/core/handle/receiveAudioHandle.py +++ b/main/xiaozhi-server/core/handle/receiveAudioHandle.py @@ -21,8 +21,9 @@ async def handleAudioMessage(conn, audio): if not hasattr(conn, "vad_resume_task") or conn.vad_resume_task.done(): conn.vad_resume_task = asyncio.create_task(resume_vad_detection(conn)) return + # manual 模式下不打断正在播放的内容 if have_voice: - if conn.client_is_speaking: + if conn.client_is_speaking and conn.client_listen_mode != "manual": await handleAbortMessage(conn) # 设备长时间空闲检测,用于say goodbye await no_voice_close_connect(conn, have_voice) @@ -73,7 +74,8 @@ async def startToChat(conn, text): ): await max_out_size(conn) return - if conn.client_is_speaking: + # manual 模式下不打断正在播放的内容 + if conn.client_is_speaking and conn.client_listen_mode != "manual": await handleAbortMessage(conn) # 首先进行意图分析,使用实际文本内容