add:火山双向tts语音流式输入输出

This commit is contained in:
lizhongxiang
2025-03-29 14:17:09 +08:00
parent 1136ca4b24
commit 264487574b
15 changed files with 839 additions and 320 deletions
@@ -28,6 +28,8 @@ async def handleTextMessage(conn, message):
if msg_json["state"] == "start":
conn.client_have_voice = True
conn.client_voice_stop = False
# 打断,开启了行的对话,如果之前有tts存在,销毁掉重新建立tts
await conn.init_and_reset_tts()
elif msg_json["state"] == "stop":
conn.client_have_voice = True
conn.client_voice_stop = True