update: 音频后台队列稳定发送

This commit is contained in:
Sakura-RanChen
2025-12-09 18:06:56 +08:00
parent 60521b0a7e
commit 48094f7e37
4 changed files with 166 additions and 125 deletions
+5
View File
@@ -1171,6 +1171,11 @@ class ConnectionHandler:
except queue.Empty:
break
# 重置音频流控器(取消后台任务并清空队列)
if hasattr(self, "audio_rate_controller") and self.audio_rate_controller:
self.audio_rate_controller.reset()
self.logger.bind(tag=TAG).debug("已重置音频流控器")
self.logger.bind(tag=TAG).debug(
f"清理结束: TTS队列大小={self.tts.tts_text_queue.qsize()}, 音频队列大小={self.tts.tts_audio_queue.qsize()}"
)