Google Assistant

Integration published by Jovo | 37,840 downloads

Build apps for Google's Assistant platform

Media Response API

Learn how to use the Google Action Media Response with Jovo.

Introduction

The Google Action Media Response allows you to play audio content, which is longer than 120 seconds. While using the Media Response you lose control of the stop, cancel and resume commands, since Google handles these themselves, without your app even receiving the request.

You can access the Media Response features in two ways:

You can check out the official documentation here.

Features

Play a File

To send the response you can use either tell() or ask(), which have both different use cases.

If you use tell() it will be handled as a final response and you won't receive a callback that the audio playback is completed.

The ask() method on the other hand will keep the session open so you can receive the callback, but it forces you to add Suggestion Chips to your response.

Set Track Metadata

The function play has an optional value, you can add some information as description, image, alt... according to Google Media Response.

Directive

The callback after the audio playback is finished will be mapped to the GoogleAction.Finished intent, which has to be placed in either the 'MEDIARESPONSE' or the 'AUDIOPLAYER' directive of your handler.

You can also use the 'AUDIOPLAYER' directive for cross-platform compatibility with the Alexa Audioplayer:

Google Assistant Changelog

Current version might be higher than the latest changes displayed below because of updates of dependencies.

3.0.12 (2020-04-09)

🐛 Bug Fix

  • #716 Corrected logic for retrieving project-ids in staged environments (@m-ripper)

Committers: 3

3.0.11 (2020-04-06)

  • Updated Typescript to 3.8.x
  • Updated Prettier to 2.x

Committers: 2

2.x

Find the 2.x changelog here.

Join Our Newsletter

Be the first to get our free tutorials, courses, and other resources for voice app developers.