Search code examples
speech-recognitionactions-on-googlegoogle-home

How do I interrupt my Actions on Google App?


I have a Node.js, Actions on Google app, hosted on an external server running Linux LTS 14.04. I noticed that when using Google Home directly (not with my app), I can interrupt long utterances from the synthesized voice by saying "stop". However with my app that doesn't work. I have to say "Hey Google, stop", instead. Apparently the "host software" on the Google Home device still looks for the activation phrase even when my app is running.

I have active logging on so can I see the user input sent to me by Google's servers in real-time. If I talk while a long utterance is playing I don't see any input sent to me by Google servers, so I'm not sure how I can get the same ability to interrupt long utterances that I see outside my app. Is there a way to do this?

NOTE: I know I can have the user say "Hey Google, stop", but that is awkward and definitely less elegant than being able to just say STOP directly, like I can when using Google Home direct (direct = when not using my app).


Solution

  • Right now, as the user is inside your app, there is no way to open the mic while your app is returning a response. Therefore, the user cannot interrupt it in the middle of speaking. When using the hotword, the mic opens up and is able to provide input to Google Home.

    You could also have the user say "OK Google, " and it'll get sent to your server, provided it's not one of the terms to exiting an app.

    For example, I can interrupt what my app says during a long output by triggering the hotword.