0

I'm trying to migrate a music player Alexa Skill to Google Home. But I cannot find a pre-built music playback (Actions or DialogFlow)... I want to reproduce streaming music using my own music server (not from Spotify or Google music).

I found a couple of examples using buildRichResponse and/or MediaObject, but these are not exactly a playback service.

Does anyone know if google home has a multimedia playback or a way to do it easily?

Thx

Mauro
  • 21
  • 1

2 Answers2

0

The Assistant's Media response is the nearest parallel to Alexa's AudioPlayer, although there are clearly differences between the two:

  • Alexa's playback is done outside the context of a session / conversation. So once you start a playback, you only have the playback controls available. Assistant Media controls are part of a conversation, so you can fully handle anything the user might say.

  • One consequence of this is that Alexa treats the playback as the result of the skill, while the Assistant treats it as part of the Action.

  • Google only sends an event when media playback has finished, and doesn't give any indication of why it has finished. Alexa reports more of the controls and has more events describing the state of the playback.

  • This makes it fairly easy to "queue up" the next audio for Alexa, but that brings additional complexity for how to handle when the queue ends up being wrong at the last moment. The Assistant doesn't have any way to queue the next audio, so there ends up being a gap between the audio ending and the next beginning while the event is handled on the server.

Although the approaches are slightly different, both seem to offer a basic long-audio playback service.

This doesn't sound like what you are trying to do, but if you are looking for something slightly more static, you can also look at the content actions that Google supports.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
0

See https://github.com/Limag/aiplayer/ for an example to play self hosted MP3s. Unfortunately, even changing the volume will not be recognized. And it seems there is no way to add this.

If you use Google Play Music, you can upload MP3s with a tiny helper application, provided by Google. Google Play Music works well, but has some other disadvantages. E.g. it is unusable for audio books, all playlists starting always from the beginning.

Limag
  • 23
  • 5