去除空格,最下端留空行

This commit is contained in:
Sakura-RanChen
2026-03-11 14:59:23 +08:00
parent 42a132f5cd
commit fbb0e02fdd
@@ -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