googlesamples / assistant-sdk-python

Samples and bindings for the Google Assistant API
http://developer.google.com/assistant/sdk
Apache License 2.0
915 stars 321 forks source link

Support for Music player. #65

Open Kinjalk opened 7 years ago

Kinjalk commented 7 years ago

How can i add support for music player ?

krsnaa commented 7 years ago

AFAIK the google assistant API doesn't currently allow you to play music files natively. (Alexa SDK was similar - they didn't initially allow it; then later added support for it after many months.)

This may be one approach that could work: Install a separate player that allows programmatic access like MOPIDY on the client. On the server/API.AI/cloud functions side, capture the appropriate intent and return a custom message in your payload that your client app recognizes and uses to issue an audio play request to your player. If you want it to be fault tolerant, use a push mechanism like firebase or cloud pub/sub.

gauravsacc commented 7 years ago

@krsnaa - I don't think you can access the payload yet (maybe in future releases) from the assistant response. Here's the response object that we have access to - https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1alpha1#google.assistant.embedded.v1alpha1.ConverseResult

But a webhook along with pub/sub implementation should work.

krsnaa commented 7 years ago

@gauravsacc - that is good to know. thank you.

Fleker commented 6 years ago

The library now supports news & podcasts.

Fleker commented 5 years ago

Keeping this open for gRPC support.