Can Google Home wait indefinitely for a response?

1.9k views Asked by At

I'm pretty sure the answer to this is "no" but I figured I'd share the question anyway in case others have a clever workaround :)

I'm building a recipe action so the user could say "Let's make tortilla soup" and then say "next step" to move on to the next part of the recipe. Between each step there might be a long pause as the user is cutting vegetables, etc. Is it possible to have Home either indefinitely wait for a user response or wait for several minutes? Currently it'll wait a few seconds and say something like "Sorry I didn't understand that response" and eventually quit the action.

Forcing the user to go through the "OK, Google, let me talk to the Chef" action over and over is pretty annoying and, I assume, would require immediately ending the conversation after every step, otherwise the device will hang and say "Sorry I didn't understand".


Update

I've found a pretty hacky way of doing this by abusing SSML. There are two options, you can stack up <break/>s

assistant.ask(`<speak><break time="120s"/><break time="120s"/></speak>`);

This actually causes the Home to play a really weird droning noise. Something the devs might wanna look at :D

Another option (which avoids the drone) is to play a 2 minute silent audio clip. According to the docs, 2 minutes is the limit for <audio> but you can stack them up. I just verified that you can make it sit there for at least ten minutes.

assistant.ask(`<speak><audio src="https://.../pause.mp3">hello</audio><audio src="https://.../pause.mp3"></audio></speak>`)

You cannot speak directly to the agent while its paused like this but you can say "OK Google, [whatever command]" and that command will actually get passed to the agent.

2

There are 2 answers

0
Daniel Situnayake On

There's not currently a way to have the Assistant wait indefinitely for a response.

While technically possible, an app using the suggested workaround to delay responding wouldn't pass the review process - the policies document mentions avoiding playing a silent sound file and communicating for a period in excess of 120 seconds.

A different approach could be to have your app remember the current position in a recipe, but end the conversation after each step. You could then use action invocation to allow the user to say something like "OK Google, ask [your app name] to continue the recipe", jumping back into the conversation and hearing the next step.

0
Prisoner On

There is not, but there is a recently announced feature that might help you do what you're trying.

When answering, you can give the reply and play an audio file using the Media Control. This has several advantages over using the SSML approach you give:

  • You'll get an event when the audio finishes, so you can prompt again with the guide, or a tip, or a reminder that your action is still there... and then play more audio while you wait.

  • At any time, the user can say "Hey Google, next step" and your server will get the message and you can send the next step. Or they can say "hey Google, repeat that" and you'll get that message and can repeat the instructions.

  • They can also ask other questions of your Action that you can answer.