Trigger local “OK Google” actions programmatically

天涯浪子 提交于 2020-08-23 03:28:30

问题


I'm writing an app that responds to custom voice commands. I want to add the ability to hand some of them off to "OK Google" functionality that handles actions locally (e.g. "launch " or "volume up"). I don't want to hand it off to to the Google Assistant cloud-based APIs, just the local version that handles simple commands that control the device. My app uses the ACTION_RECOGNIZE_SPEECH intent to get the spoken text. The goal is that if it's not a command my app handles, it will trigger whatever handles "OK Google" commands with the text it already has.

来源:https://stackoverflow.com/questions/45965226/trigger-local-ok-google-actions-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!