From bcf98c53659f12484199ecbe01c588357c9cbc6a Mon Sep 17 00:00:00 2001 From: Del Wang Date: Mon, 26 May 2025 21:56:52 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=E5=94=A4=E9=86=92?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/xiaozhi/config.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/examples/xiaozhi/config.py b/examples/xiaozhi/config.py index 1ccfd3a..22be498 100644 --- a/examples/xiaozhi/config.py +++ b/examples/xiaozhi/config.py @@ -9,19 +9,12 @@ async def before_wakeup(speaker, text, source): - 'kws': 关键字唤醒 - 'xiaoai': 小爱同学收到用户指令 """ - if source == "kws" and text == "你好小智": + if source == "kws": # 播放唤醒提示语 await speaker.play(text="你好主人,我是小智,请问有什么吩咐?") # 返回 True 唤醒小智 AI return True - if source == "kws" and text == "hi siri": - # 播放唤醒提示语 - await speaker.play(text="I'm Siri, how can I help you?") - # 唤醒小爱 - await speaker.wake_up() - return False - if source == "xiaoai" and text == "召唤小智": # 打断原来的小爱同学 await speaker.abort_xiaoai()