This commit is contained in:
seven 2025-03-29 18:42:32 +08:00
parent 08cb567f06
commit 18f84042ba

View file

@ -43,8 +43,7 @@ async def sendAudioStream(conn, audios):
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}') 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:',b'').decode('utf-8'))
await send_tts_message(conn, "sentence_start", opus_packet)
continue continue
if len(opus_packet) < 1: if len(opus_packet) < 1:
continue continue