espressif / esp-va-sdk

Espressif's Voice Assistant SDK: Alexa, Google Voice Assistant, Google DialogFlow
Other
294 stars 83 forks source link

Amazon Music Support #61

Open renovatio-systems opened 5 years ago

renovatio-systems commented 5 years ago

Hi, We are considering using esp32-va-sdk in our commercial projects. But we would require Amazon Music (Prime) support. Could you please let us know the steps involved in achieving this? Regards Kumar

avsheth commented 5 years ago

Hi @renovatio-systems In order to enable Amazon prime music and other media streaming services (such as Saavn for India) you need to get your product ID whitelisted from Amazon. You can raise a request to whitelist your product ID from Amazon's developer website.

And you can then set this product_id in app_main.c as va_cfg->product_id = ""

Hope it helps.

Thanks, Amit

renovatio-systems commented 5 years ago

Hello @avsheth I just created an Amazon product under developer.amazon.com.

And then I set a parameter under app_main.c

va_cfg->product_id = ""

Recompiled, erased the flash completly, reprogrammed and reprovisioned with the app. It is still coming up with the same problem.

Is there any other setup that is needed?

Regards Kumar

renovatio-systems commented 5 years ago

Also, there is another parameter device_serial_num? Is this needed at all?

avsheth commented 5 years ago

Hi @renovatio-systems Just creating a new ID won't suffice. A request to an Amazon PoC needs to be sent explicitly to whitelist the ID. If you go to https://developer.amazon.com/alexa/console/avs/products -> select your product -> go to Entertainment, you'll see a list of MSPs and their respective statuses i.e. whether access has been requested/granted or not. In order to get the access you have to get in touch with Amazon's point of contact and get your product ID whitelisted.

For serial_num, it is mainly required at manufacturing time to identify individual devices. It is not required for Amazon music access. Access is specific to the product_id and all devices with the same product_id (even if they have same serial_num) will be able to access streaming services your ID has access to.

dhruvchikhaliya commented 4 years ago

But will they whitelist product id for a single unit. Thanks : )

renovatio-systems commented 4 years ago

Hi @avsheth,

We got out device white listed by Amazon. But when we try and provision the app with the new product ID and the Espressif Android App. It used to work for few weeks and suddenly stopped working and we cant seem to provision any more boards. We get the following error (not very helpful at all) Error

But if we dont set the product_id it works fine. I am bot sure if Amazon are blocking the provisioning. We have asked them as well. Any help on this would be useful.

Thank you.

Warm Regards Renovatio Systems

avsheth commented 4 years ago

Hi @renovatio-systems Basically the API key generated for your product ID should be embedded in the Android app. And the app needs to be rebuilt with this new product ID. So product ID on the device should match with corresponding API key in the android app. In order to generate/retrieve API key for your product, you can follow the guide here

There are couple of things you need to change in the Android app source, you can refer to it's readme here.

Hope this helps.

renovatio-systems commented 4 years ago

Thanks @avsheth

Unfortunately, that link for the guide no longer exists. Could you please provide a newer link or an offline copy of the document.

Warm Regards Renovatio Systems

omarfakhr commented 1 year ago

Where exactly in app_main.c can i set: va_cfg->product_id = ""

And can I invent my own name? Or do i have to take the name already available on the board?