maganap
maganap

Reputation: 2894

Actions on Google - Close mic without closing the app, or workaround suggestions

Is it possible to close the mic without closing the app?

Or any suggestions to the below explained situation are very welcome:

I've found some posts already asking for this, but they have about a year old so I wonder whether there's something new.

I'm using conv.close('some message not prompting');. That closes the mic, but also closes the app, which is not what I need.

The functionality I need is the same that AOG takes by default when showing a browsing carousel: it automatically closes the mic (but not the app), and the user can re-open the mic or tap on a suggestion chip to interact with your app directly, without the need to invoke it again.

I was suggested to add a tail saying What else can I do for you? after each reply that doesn't prompt the user for new information, so I can keep the mic open, but that sounds so unnatural that I really think it kills the purpose of trying to sound natural with a bot.

There are many situations where you can expect the user to say something, even though you're not asking for anything. A simple example is when telling a joke: you can expect the user to laugh, criticize, ask for another joke or make whatever comment. In this case, closing the mic (and the app) is nonsense, and adding a Do you want to hear another joke? tail doesn't sound good after the joke, specially if you're telling one after another.

The purpose here is not to be rejected by the AOG review team because I'm leaving the mic open.

Any ideas are welcome. Thanks in advance.

Upvotes: 2

Views: 500

Answers (2)

Prisoner
Prisoner

Reputation: 50701

You don't need to explicitly prompt for "what next", but you do need to make clear if you're expecting something further from the user. The easiest way to do that is to rotate through some prompts. (Libraries like multivocal make this easier.)

The notion of "closing the microphone without closing the conversation" leads to the question of "ok, how do they close the conversation?" And for simple one-off scenario that you've described, that isn't always obvious.

That said, there are a few thoughts about how you can approach it depending on your needs.

If there is a reason you need to close the microphone, yet still allow the user to issue a command while still in the Action, you can consider sending a Media object as part of your response. When the playback finishes, your Action will be triggered to let you know, and you can either prompt the user again (and play more audio) or eventually agree to close the conversation. Users would interrupt the audio with "Hey Google" prompted by a command in your Action.

Another approach for things that are truly "one off", but where they may want to followup in rarer cases, is to keep track of user state (if you need to reference it in a followup) and close the conversation. The user would be able to "re-start" the conversation if they need to, either through normal invocation or through a deep-linking invocation. This does close the conversation - but makes it easy to restart.

Upvotes: 1

Codebricks
Codebricks

Reputation: 1253

I have written 2 google home apps now and had them initially rejected if any of my intents did not ask a follow-up question. I agree that it can sound a little unnatural always asking a follow-up question. I get my answer logic (on my endpoint) to append a random follow-up question from a pre-defined list to try and vary things up a bit.

Upvotes: 0

Related Questions