1

So, the basic idea is this:

I make a request to an assistant app to play some audio.

In general, these requests will come from a Google Home device (I know, they could come from a mobile phone etc, but I'm only worried about Home devices right now).

I can easily send a text response back and have it read.

But what I'd rather do it stream an audio file to the source device via standard Chromecasting stuff.

If I make my request something like "Hey Google, ask {my app} to read me the instructions for {blah} in the {living room}" then it's no problem to pick out "living room" as the target device and send the audio there. That works perfect.

But if the user says "Hey Google, ask {my app} to read me the instructions for {blah}"

What i'd like is to be able to send the audio to the device the request came from.

I found this question:

Detect request coming from google home using dialogflow

which is close but not exactly what I'm after.

EDIT: I also found the "MEDIA RESPONSE" info, but it looks like that would only be good for a single media response. In my case, I may have several audio clips that need to play back to back, so a single media response wouldn't work. (at least, I don't see a way it would work from what I know).

Is this even possible?

Prisoner
  • 49,922
  • 7
  • 53
  • 105
DarinH
  • 4,868
  • 2
  • 22
  • 32

1 Answers1

1

We currently don't have the ability to treat the Home like a Chromecast through an Action.

However, as you note, we do have the ability to use the [Media Response][1]. As you note, it does only send one audio at a time, however, when it is completed Dialogflow will be called with an Event of actions_intent_MEDIA_STATUS which you can create an Intent to capture. You can then send another Media Response with the next song in the playlist. (Or do whatever else you want as part of the conversation.)

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • I did not know about the follow on event! Thanks for that! Ideally, the surface element of the initial response (or some other element) would contain the name of the originating device. But in the meantime, the actions_intent_MEDIA_STATUS could work – DarinH Apr 13 '18 at 22:31