mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
去除空格,最下端留空行
This commit is contained in:
parent
42a132f5cd
commit
fbb0e02fdd
1 changed files with 2 additions and 2 deletions
|
|
@ -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):
|
async def send_tts_message(conn: "ConnectionHandler", state, text=None):
|
||||||
"""发送 TTS 状态消息"""
|
"""发送 TTS 状态消息"""
|
||||||
if text is None and state == "sentence_start":
|
if text is None and state == "sentence_start":
|
||||||
return
|
return
|
||||||
message = {"type": "tts", "state": state, "session_id": conn.session_id}
|
message = {"type": "tts", "state": state, "session_id": conn.session_id}
|
||||||
if text is not None:
|
if text is not None:
|
||||||
message["text"] = textUtils.check_emoji(text)
|
message["text"] = textUtils.check_emoji(text)
|
||||||
|
|
@ -315,4 +315,4 @@ async def send_stt_message(conn: "ConnectionHandler", text):
|
||||||
)
|
)
|
||||||
await send_tts_message(conn, "start")
|
await send_tts_message(conn, "start")
|
||||||
# 发送start消息后客户端状态会处于说话中状态,同步服务端状态
|
# 发送start消息后客户端状态会处于说话中状态,同步服务端状态
|
||||||
conn.client_is_speaking = True
|
conn.client_is_speaking = True
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue