ndg63276

is creating Alexa Youtube

66

patrons

$131

per month

About ndg63276

Would you like your Alexa device to play videos from YouTube? Play any music that has a video on YouTube? Well you can, for just $3 USD/month. Equivalent prices are £2 GBP, €2.50 EUR, $4 CAD, all monthly.

A little while ago, I made an Alexa skill that enables YouTube. Unfortunately, Amazon will not allow it in the Alexa skill store, so you have to do a little work. You have to register as an Alexa developer (it's free), "create" the skill, and then run it in a test mode. Don't worry, full instructions are below.

So why am I asking for donations? Well, the skill uses what is called a Lambda instance, which is basically some code running on Amazon's servers. Initially I let anyone use my Lambda instance, but the skill has become so popular that Amazon is starting to charge me for using their servers. So now I am asking for the small amount of $3/month, to cover my expenses.

Once you have set up your monthly donation, email me at [email protected], and I will reply with the unique skill "ARN" that you will need. You can cancel your sponsorship at any time, although obviously I will disable your "ARN".


Setup Instructions

  1. Go to the Alexa Console (https://developer.amazon.com/alexa/console/ask)
  2. If you have not registered as an Amazon Developer then you will need to do so. Fill in your details and ensure you answer "NO" for "Do you plan to monetize apps by charging for apps or selling in-app items" and "Do you plan to monetize apps by displaying ads from the Amazon Mobile Ad Network or Mobile Associates?"
  3. Once you are logged into your account click "Create Skill" on the right hand side.
  4. Give your skill any name, eg "My YouTube Skill".
  5. Important Set the language to whatever your Echo device is set to. If you are not sure, go to the Alexa app, go to Settings, Device Settings, then click on your Echo device, and look under Language. If your Echo is set to English (UK), then the skill must be English (UK), other types of English will not work!
  6. Choose "Custom" as your model, and "Provision Your Own" as your method, then click "Create Skill". On the template page, choose "Hello World skill".
  7. On the left hand side, click the arrow next to "Interaction Model", then click "JSON Editor".
  8. Delete everything in the text box, and copy in the text from here, (or French, Italian, German, Spanish).
  9. Click "Save Model" at the top.
  10. Click "Interfaces" in the menu on the left, and enable "Audio Player" and "Video App". Click "Save Interfaces".
  11. Click "Endpoint" in the menu on the left, and select "AWS Lambda ARN". Under "Default Region", put the address I give you by email. Click "Save Endpoints". (If you would like to test the skill before becoming a patron, put arn:aws:lambda:eu-west-1:175548706300:function:YouTubeTest - but this address will only play Gangnam Style).
  12. Click "Tools" on the left, and then click "Permissions", and turn on "Lists Read" and "Lists Write".
  13. Click "Custom" in the menu on the left, then click "Invocation" in the menu on the left.
  14. Click "Build Model". This will take a minute, be patient. It should tell you if it succeeded.
  15. Important: At the top, click "Test". Where it says "Test is disabled for this skill", change the dropdown from "Off" to "Development".

Features

  • Play audio from YouTube videos
  • Play video (if supported) on live videos or if you ask for just one specific video (command 8)
  • Makes a list of all the videos played, in the Alexa app

Launching

  • In English, say "Alexa, launch YouTube".
  • In German, say "Alexa, öffne YouTube".
  • In Italian, say "Alexa, avvia YouTube".
  • In Spanish, say "Alexa, abrir YouTube".

Skill Commands

  1. Play a video, eg "Alexa, ask YouTube to play Gangnam Style"
  2. Play a playlist, eg "Alexa, ask YouTube to play playlist Ultimate Beyonce"
  3. Play a channel, eg "Alexa, ask YouTube to play channel Fall Out Boy Vevo"
  4. You can replace "play" with "shuffle" to get a randomised version of the search results/channel/playlist, eg "Alexa, ask YouTube to shuffle channel Nicki Minaj"
  5. Next / Previous / Start Over / Pause / Resume should all work
  6. Ask what is playing by "Alexa, ask YouTube what song is playing" (or just "Alexa, can you repeat that?" should tell you)
  7. Skip forward or back in the video by "Alexa, ask YouTube to skip forward/backward to/by one minute and one second"
  8. Just play one video by "Alexa, ask YouTube to play one video Gangnam Style". You can switch in and out of "autoplay" mode by "Alexa, ask YouTube to turn on/off autoplay."
  9. Play related videos, by "Alexa, ask YouTube to play more like this". This is a YouTube feature, don't ask me why it plays what it plays.

FAQ

  • Alexa tells me she can't find any supported video skills, what does that mean? Alexa is trying to be too clever, and not launching this skill. Start your request by saying 'Alexa, launch YouTube' and then when she says 'Welcome to YouTube', ask for the video you want.
  • She still says she can't find any video skills. Make sure to follow step 15 above, enabling Testing for Development.
  • She still says she can't find any video skills! Try using a different word to start the skill. In English, say "Alexa, launch YouTube". In German, say "Alexa, öffne YouTube". In Italian, say "Alexa, avvia YouTube". In Spanish, say "Alexa, abrir YouTube".
  • I am getting another issue, can you fix it? Hopefully. Send me an email with the exact wording of what you ask Alexa, so I can try and reproduce it.
  • If I try and test in the Developer Console, it says 'Unsupported Directive. AudioPlayer is currently an unsupported namespace. Check the device log for more information.' That is normal, the Developer Console doesn't play audio. You just need to enable testing through the Developer Console, then you can use the skill through your Alexa device.
  • Why don't more videos work as video? Alexa doesn't provide any ability to queue videos, so you only get one video, then it stops. So it only plays videos if you ask for one specific video, or if it is a live video.
By becoming a patron, you'll instantly unlock access to 4 exclusive posts
4
Writings
By becoming a patron, you'll instantly unlock access to 4 exclusive posts
4
Writings

Recent posts by ndg63276

How it works

Get started in 2 minutes

Choose a membership
Sign up
Add a payment method
Get benefits