[英]Trigger my Google Assistant App on pressing a button
I have a AIY Voice Kit fully assembled and functional (I have tested the 3 demos.py sucessfully). 我有一个完全组装好的AIY语音工具包,并且可以正常工作(我已经成功测试了3个demos.py)。 I managed to launch the demo where we have to push the button to launch the Google assistant.
我设法启动了演示,我们必须按一下按钮才能启动Google助手。 But now I wan that it ONLY trigger my Google action (and directly launch « Welcome to XXXX app. Do you want… »).
但是,现在我希望它仅触发我的Google操作(并直接启动“欢迎使用XXXX应用程序。您要...”)。 How can I manage to do that ?
我该怎么做呢?
You can override your button handler and pass in a text string by default, kinda like is done in the text input sample . 您可以覆盖按钮处理程序,并默认情况下传递文本字符串,有点像在文本输入示例中所做的那样。
def buttonPress():
assistant.assist(text_query="talk to XXXX app")
You can create regular HTTP links that triggers your action if you are on a device that has assistant. 您可以创建常规HTTP链接,如果您使用的是具有助手的设备,则可以触发您的操作。 See the official documentation: https://developers.google.com/actions/deploy/action-links
请参阅官方文档: https : //developers.google.com/actions/deploy/action-links
You can generate a URL that will link directly to the specific Action, on a per-Action basis.
您可以生成一个URL,该URL将基于每个动作直接链接到特定的动作。 Users who click the Action link in a web or mobile browser will be directed to the Assistant on their device, where they'll interact directly with your corresponding Action.
在Web或移动浏览器中单击“操作”链接的用户将被定向到其设备上的“助手”,在那里他们将直接与您相应的“操作”进行交互。
You'll find it under the AoG console Actions -> <action to trigger> -> Links
您可以在AoG控制台的“
Actions -> <action to trigger> -> Links
下找到它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.