mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
fix:停止音频发送循环(仅在流控器已初始化时调用)
This commit is contained in:
parent
a9f5f1ab81
commit
11142104af
1 changed files with 3 additions and 2 deletions
|
|
@ -280,8 +280,9 @@ async def send_tts_message(conn: "ConnectionHandler", state, text=None):
|
||||||
await sendAudio(conn, audios)
|
await sendAudio(conn, audios)
|
||||||
# 等待所有音频包发送完成
|
# 等待所有音频包发送完成
|
||||||
await _wait_for_audio_completion(conn)
|
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()
|
conn.clearSpeakStatus()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue