From 2a8ec27ba6e649ed7d12fa5bb81ae5f506e610f3 Mon Sep 17 00:00:00 2001 From: CGD <3030332422@qq.com> Date: Fri, 13 Jun 2025 10:34:36 +0800 Subject: [PATCH] =?UTF-8?q?update:=E9=80=9A=E8=BF=87=E2=80=9C=E5=BD=93?= =?UTF-8?q?=E4=BC=9A=E8=AF=9DID=E4=B8=BANone=E6=97=B6=EF=BC=8C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=94=9F=E6=88=90=E6=96=B0=E7=9A=84=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?ID=E2=80=9D=EF=BC=8C=E8=A7=A3=E5=86=B3=E2=80=9C=E9=A6=96?= =?UTF-8?q?=E6=AC=A1=E4=BB=8E=E6=99=BA=E6=8E=A7=E5=8F=B0=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=97=A0=E6=B3=95=E6=92=AD=E6=94=BE=E9=9F=B3?= =?UTF-8?q?=E4=B9=90=E2=80=9D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/providers/tts/huoshan_double_stream.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/xiaozhi-server/core/providers/tts/huoshan_double_stream.py b/main/xiaozhi-server/core/providers/tts/huoshan_double_stream.py index 6e4b9eac..7e8bbe6b 100644 --- a/main/xiaozhi-server/core/providers/tts/huoshan_double_stream.py +++ b/main/xiaozhi-server/core/providers/tts/huoshan_double_stream.py @@ -202,6 +202,10 @@ class TTSProvider(TTSProviderBase): if message.sentence_type == SentenceType.FIRST: # 初始化参数 try: + if not getattr(self.conn, "sentence_id", None): + self.conn.sentence_id = uuid.uuid4().hex + logger.bind(tag=TAG).info(f"自动生成新的 会话ID: {self.conn.sentence_id}") + logger.bind(tag=TAG).info("开始启动TTS会话...") future = asyncio.run_coroutine_threadsafe( self.start_session(self.conn.sentence_id),