mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
去除空格,最下端留空行
This commit is contained in:
@@ -263,7 +263,7 @@ async def _do_send_audio(conn: "ConnectionHandler", opus_packet, flow_control):
|
||||
async def send_tts_message(conn: "ConnectionHandler", state, text=None):
|
||||
"""发送 TTS 状态消息"""
|
||||
if text is None and state == "sentence_start":
|
||||
return
|
||||
return
|
||||
message = {"type": "tts", "state": state, "session_id": conn.session_id}
|
||||
if text is not None:
|
||||
message["text"] = textUtils.check_emoji(text)
|
||||
@@ -315,4 +315,4 @@ async def send_stt_message(conn: "ConnectionHandler", text):
|
||||
)
|
||||
await send_tts_message(conn, "start")
|
||||
# 发送start消息后客户端状态会处于说话中状态,同步服务端状态
|
||||
conn.client_is_speaking = True
|
||||
conn.client_is_speaking = True
|
||||
|
||||
Reference in New Issue
Block a user