语音发送的开始和结尾仅与TTS相关,不关心LLM;LLM调用MCP时异步消息会引发问题

This commit is contained in:
Chingfeng Li
2025-11-18 15:00:55 +08:00
parent a5e4aa1300
commit bbab4ebc86
@@ -23,7 +23,7 @@ async def sendAudioMessage(conn, sentenceType, audios, text):
conn.logger.bind(tag=TAG).info(f"发送音频消息: {sentenceType}, {text}")
# 发送结束消息(如果是最后一个文本)
if conn.llm_finish_task and sentenceType == SentenceType.LAST:
if sentenceType == SentenceType.LAST:
await send_tts_message(conn, "stop", None)
conn.client_is_speaking = False
if conn.close_after_chat: