diff --git a/docs/todo.md b/docs/todo.md index 3252426..d479979 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -4,11 +4,11 @@ ## 🔥 Hotfix +- ✅ 修复对 Azure OpenAI Service 的支持 - ✅ 修复 MIoT 和 Mina 接口查询到的设备名称不一致的问题。https://github.com/idootop/mi-gpt/issues/62 -- ✅ 提示语列表为空,或提示语和提示音链接都为空时,不播放提示音。https://github.com/idootop/mi-gpt/issues/30#issuecomment-2153786207 -- 修复唤醒模式下,重新匹配唤醒词时,应该走询问 AI 的流程。([issues#25](https://github.com/idootop/mi-gpt/issues/25)) +- ✅ 提示语列表为空时,不播放提示音。https://github.com/idootop/mi-gpt/issues/30#issuecomment-2153786207 +- ✅ 唤醒模式下重新匹配唤醒词时,不再重复唤醒。https://github.com/idootop/mi-gpt/issues/25 - ✅ 修复使用提示音链接时,小爱回答完毕后,仍然重复播放文字提示语的问题。 -- 优化网络请求错误重试策略(消息/播放状态轮询) ## 💪 优化 @@ -51,9 +51,11 @@ ## ✨ 新功能 - 支持火山引擎 TTS 和音色切换能力 -- 开放 System Prompt 自定义能力 +- 开放自定义 System Prompt 能力 - 添加更详细的使用和配置视频教程 ## 💪 优化 -- 添加常见小爱音箱型号的支持情况和参数列表。 +- 优化网络请求错误重试策略(消息/播放状态轮询) +- 添加常见小爱音箱型号的支持情况和参数列表 +- 【待定】使用通知事件获取最新消息和设备播放状态 diff --git a/src/services/speaker/ai.ts b/src/services/speaker/ai.ts index dc93b62..0a089ca 100644 --- a/src/services/speaker/ai.ts +++ b/src/services/speaker/ai.ts @@ -166,13 +166,17 @@ export class AISpeaker extends Speaker { get commands() { return [ { - match: (msg) => this.wakeUpKeywords.some((e) => msg.text.includes(e)), + match: (msg) => + !this.keepAlive && + this.wakeUpKeywords.some((e) => msg.text.startsWith(e)), run: async (msg) => { await this.enterKeepAlive(); }, }, { - match: (msg) => this.exitKeywords.some((e) => msg.text.includes(e)), + match: (msg) => + this.keepAlive && + this.exitKeywords.some((e) => msg.text.startsWith(e)), run: async (msg) => { await this.exitKeepAlive(); },