Open Kinjalk opened 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.
@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.
@gauravsacc - that is good to know. thank you.
The library now supports news & podcasts.
Keeping this open for gRPC support.
How can i add support for music player ?