From ece3aa903b6705efe268114db52795a72a80db70 Mon Sep 17 00:00:00 2001 From: Chingfeng Li Date: Tue, 18 Nov 2025 13:10:10 +0800 Subject: [PATCH] =?UTF-8?q?TTS=E5=90=88=E6=88=90=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=9C=89=E5=BC=82=E6=AD=A5?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=A4=84=E7=90=86=EF=BC=8C=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=BF=9E=E6=8E=A5=E5=90=88=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/providers/tts/aliyun_stream.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/xiaozhi-server/core/providers/tts/aliyun_stream.py b/main/xiaozhi-server/core/providers/tts/aliyun_stream.py index bcbf2b401..df44ff79f 100644 --- a/main/xiaozhi-server/core/providers/tts/aliyun_stream.py +++ b/main/xiaozhi-server/core/providers/tts/aliyun_stream.py @@ -285,8 +285,9 @@ class TTSProvider(TTSProviderBase): async def text_to_speak(self, text, _): try: if self.ws is None: - logger.bind(tag=TAG).warning(f"WebSocket连接不存在,终止发送文本") - return + logger.bind(tag=TAG).debug(f"WebSocket连接不存在,重新启动TTS会话...") + await self.start_session(self.task_id) + logger.bind(tag=TAG).debug("TTS会话启动成功") filtered_text = MarkdownCleaner.clean_markdown(text) run_request = { "header": {