Merge pull request #3069 from xinnan-tech/py_fix_wakeup

fix:停止音频发送循环(仅在流控器已初始化时调用)
This commit is contained in:
Sakura-RanChen
2026-04-03 09:48:16 +08:00
committed by GitHub
@@ -280,8 +280,9 @@ async def send_tts_message(conn: "ConnectionHandler", state, text=None):
await sendAudio(conn, audios)
# 等待所有音频包发送完成
await _wait_for_audio_completion(conn)
# 停止音频发送循环
conn.audio_rate_controller.stop_sending()
# 停止音频发送循环(仅在流控器已初始化时调用)
if hasattr(conn, "audio_rate_controller") and conn.audio_rate_controller:
conn.audio_rate_controller.stop_sending()
# 清除服务端讲话状态
conn.clearSpeakStatus()