From d3d329bd4313b2e26640706fb2adf8c0db2ae62c Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Thu, 4 Dec 2025 18:45:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=8A=B6=E6=80=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/handle/sendAudioHandle.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/xiaozhi-server/core/handle/sendAudioHandle.py b/main/xiaozhi-server/core/handle/sendAudioHandle.py index 14f43232..ea952fbe 100644 --- a/main/xiaozhi-server/core/handle/sendAudioHandle.py +++ b/main/xiaozhi-server/core/handle/sendAudioHandle.py @@ -116,6 +116,7 @@ async def _sendAudio_single(conn, opus_packet, send_delay, frame_duration=60): if packet_count < pre_buffer_count or send_delay > 0: # 预缓冲阶段或固定延迟模式,直接发送 await _do_send_audio(conn, opus_packet, flow_control, frame_duration) + conn.client_is_speaking = True if send_delay > 0 and packet_count >= pre_buffer_count: await asyncio.sleep(send_delay) @@ -127,6 +128,7 @@ async def _sendAudio_single(conn, opus_packet, send_delay, frame_duration=60): await _do_send_audio(conn, packet, flow_control, frame_duration) await rate_controller.check_queue(send_callback) + conn.client_is_speaking = True # 更新流控状态 flow_control["packet_count"] += 1