question

Rob G. avatar image
Rob G. asked

Stream a Radio Station

Hoping to find some help on this. I have never developed an Alexa Skill before. Just created my developer account and AWS account. I have no clue how to go about creating a skill to play a radio station stream. I have an HTTPS .mp3 web stream URL for my radio station. Want to be able to say "Alexa, play XYZ radio." and have that stream start playing. Any help on this will be greatly appreciated!!

alexa skills kitaudio
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jenn@amazon avatar image
Jenn@amazon answered

The AudioPlayer Directives can accomplish the behavior.

https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/custom-audioplayer-interface-reference

Here's an example on GitHub that streams a single audio stream.

https://github.com/JennJin/single-live-stream

6 comments
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rob G. - Did you get it working?

Jenn - Can you help me with mine? Same question as Rob G.

I just went through the Development Kit, completed the seven sections, and I am now in the "Skills Beta Testing" stage, or I can "Submit for certification"...

I'm not a computer guy, rather I'm a sales/marketing guy, so you may have to talk to me in 'Alexa Development 101' speak...

1 Like 1 ·

Did you try the example code on GitHub?

You just need to update the audioAsset.js and constants.js files. Zip up the files and upload to Lambda.

0 Likes 0 ·

yeah just zip it up! lol

0 Likes 0 ·
Show more comments
Show more comments
Vertoochi avatar image
Vertoochi answered

I am stuck. I did all these changes, zipped it, and added it to the Lambda function, but I am obviously doing something wrong

1 comment
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hope the below helps. If you've got the command line tools and have the Lambda code in the right directory, you don't have to zip anything; Ask Deploy will update the Lambda code for you.

0 Likes 0 ·
Dean Tobler avatar image
Dean Tobler answered

I successfully used the code referenced above to pass certification of skills for four of our stations (so far). My experience was that the instructions seemed incomplete in a couple of areas, mainly when it came to the ASK CLI (command line) utility as well as the Lambda CLI and NPM. Be sure to read up on those extensively and make sure you have them installed.

Once I had those dependencies in place, I found the best process was to set up most of the parameters of the Skill (Skill Name, Etc) in the Developer portal then clone the initial setup to my desktop pc by doing "ask clone" on the command line (after ask init). This presents a list of Skills available in your account to clone...I did this inside a folder on my hard drive and it clones the proper file structure into a sub-folder called "Skill_Name". The next thing is to copy the code from the Github repository into the directory structure. One thing the documentation leaves out is that the default source directory for the Lambda code in Ask is under Lamba\Custom...make sure to copy the files from the repository (Lambda\Src) to this directory on your hard drive.

One other note because several of my Skills have failed certification on this point; links to your Large and Small App Icons are hard-coded in two places 1) In the Skill.json file in the root directory of the Skill and 2) in the audioAssets.js file located in lambda\custom. The links in Skill.json appear to come from ASK Developer online, while the others are part of the code example. Make sure to copy the image links from Skill.json to the appropriate location in audioAssets.js so that the Skill displays the appropriate image on the Skill Card.

3 comments
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

As a side note to the above, it's curious that several of my Skills passed certification without changing the Image URLs noted in the last paragraph. I would suppose that the image url sections in the audioAssets.js file could simply be eliminated and the Skill would default to the urls in Skill.json but I haven't tested that.

0 Likes 0 ·

Answered my own question on the Large and Small Icon URLs; pasting the code from the Skill.json doesn't work. I went through creating a "Bucket" on AWS S3 and put my logos there and it works now; the caveat being that S3 doesn't consistently return the correct image with the "Card" in the Alexa App...even though the URLs in my code are valid (i.e.- I can follow the link in the S3 console and it displays correctly. It may be that I should put my logos in different "Buckets" just not that familiar with S3 but it seems quirky.

0 Likes 0 ·

@Dean Tobler another way you can update the small and large icons outside of having to add URL's to the skills.json in the CLI. You can update the small and large icons in the Skill Console by going through your Alexa Skills Portal and manually upload your logos.

That's if you're a GUI person (or want someone else to do it for you).

As far as S3 buckets go, make sure you enable AES-256. I'm not sure if you need to make the bucket or object public if going from AWS to Amazon resource. Seems like you would need to test both options. As for myself, I manage two S3 buckets, one open to the public (where I only host assets and non executables) and another private one that I only share with other private AWS resources.

Hope this helps.

0 Likes 0 ·
newuser-7fae9a50-164b-4fdb-bd84-8d3e16bd04c9 avatar image
newuser-7fae9a50-164b-4fdb-bd84-8d3e16bd04c9 answered

Hello.

Thank you for all technical info regarding the skill development of a simple radio stream.

Unfortunatly, i failed the certification step of my skill due to copyright issue :

"Protecting intellectual property rights is important to us. Please provide documentation demonstrating that you have the right to use the music content within your skill. The documentation must be either a confirmation letter from the intellectual property rights holder or a copy of the applicable license."

What kind of documentation are we supposed to give in order to unsure the radio stream is compliant with intellectual property rights ?

Regards

Franck

1 comment
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello Franck, thanks for posting on our forum!

The documentation needed in order to prove that you have valid IP rights for the music content within your skill can be either one of the following:

1) A confirmation letter from the IP rights holder with a formal signature

2) A copy of the applicable license agreement

As far as submitting that documentation is concerned, please provide a sharable link to the documentation in your next submission. If you have a file sharing service like, Box, Dropbox, S3 etc., you may upload your documentation to that service. Paste the sharable link on the "Launch" tab, under "Privacy & Compliance" at the bottom of the page in the "Testing Instructions" section, along with a note that the link contains your IP documentation. Then all you'll need to do is click "Submit for certification."

If you are still unsure how to proceed or have additional questions, please don’t hesitate to ask.

Thanks,

Claudia

0 Likes 0 ·