From 9657ec3f89892be962be0621e1e3adca86b3d98a Mon Sep 17 00:00:00 2001 From: seven Date: Sat, 29 Mar 2025 18:36:19 +0800 Subject: [PATCH] add --- main/xiaozhi-server/core/handle/sendAudioHandle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/xiaozhi-server/core/handle/sendAudioHandle.py b/main/xiaozhi-server/core/handle/sendAudioHandle.py index 25c58d71d..e15d11128 100644 --- a/main/xiaozhi-server/core/handle/sendAudioHandle.py +++ b/main/xiaozhi-server/core/handle/sendAudioHandle.py @@ -41,7 +41,7 @@ async def sendAudioStream(conn, audios): conn.logger.bind(tag=TAG).info('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') count = 0 async for opus_packet in audios: - if opus_packet.startswith(b'text:'): + if isinstance(opus_packet,bytes) and opus_packet.startswith(b'text:'): await send_tts_message(conn, "sentence_start", opus_packet.replace(b'text:','').decode('utf-8')) continue if len(opus_packet) < 1: