This commit is contained in:
seven 2025-03-29 18:37:48 +08:00
parent 9657ec3f89
commit 891fdbb271

View file

@ -41,6 +41,7 @@ async def sendAudioStream(conn, audios):
conn.logger.bind(tag=TAG).info('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') conn.logger.bind(tag=TAG).info('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
count = 0 count = 0
async for opus_packet in audios: async for opus_packet in audios:
conn.logger.bind(tag=TAG).info(f'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,{type(opus_packet)},{opus_packet}')
if isinstance(opus_packet,bytes) and 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')) await send_tts_message(conn, "sentence_start", opus_packet.replace(b'text:','').decode('utf-8'))
continue continue