使用 Google 助理添加语音控制

Adding voice control with Google Assistant

这两天在研究Google助手,这两天弄糊涂了。之前的教程似乎更多地介绍了如何为 Google 助手创建应用程序,但我想做相反的事情。

我已经有一个 运行 应用程序,我想添加通过 Google 助手处理的语音命令在应用程序中导航的可能性。

我在搜索中迷路了。有没有人有一个起点让我实现我的目标?哪些积分对我有用?

如果您只想在应用程序上下文中集成语音命令,使用 Dialogflow. It will use Google Cloud's speech to text while giving you the ability to handle your intents. There's a sample 可能是个好主意,它使用 Android.

使用 Google 助手也可以与 Google Assistant SDK. There is a sample 一起使用,它使用 Android Things,但可以轻松移植到任何 Android 设备。它可以让你向助手发送语音命令并获得回复。但是,它稍微更通用。如果用户在您的应用中询问某些内容,他们可能只想在您的应用上下文中得到答案,而不是回退到 Google 助理。