Unofficial YouTube skill for Alexa
- 2nd June 2018: The skill now handles playlists or channels where none of the videos exist (eg copyrighted deletions). It will now ask you if you want to try the next playlist or channel. If you have already created the skill, you will need to update the Interaction Model json file in your Alexa skill, ie step 7 under Setup Instructions.
- 22nd August 2018: Fixed a bug where channels turn up in video search results, eg in Play videos by The Beatles.
- Play audio (currently no video) from YouTube videos
- Live videos are supported as much as possible
- Play a video, eg "Alexa, ask YouTube to play Gangnam Style"
- Play a playlist, eg "Alexa, ask YouTube to play playlist Ultimate Beyonce"
- Play a channel, eg "Alexa, ask YouTube to play channel Fall Out Boy Vevo"
- You can replace "play" with "shuffle" to get a randomized version of the search results/channel/playlist, eg "Alexa, ask YouTube to shuffle channel Nicki Minaj"
- Next / Previous / Start Over / Pause / Resume should all work
- Ask what is playing by "Alexa, ask YouTube what song is playing" (or just "Alexa, can you repeat that?" should tell you)
- Some videos just fail, it's not clear why, they work locally. The skill just moves to the next video on the playlist, but this can mean sometimes she announces a video that doesn't play.
- It doesn't play video, because I don't have an Echo Show or Echo Spot to test on. If you want to buy me one, get in touch!
- Go to the Alexa Console (https://developer.amazon.com/alexa/console/ask)
- 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?"
- Once you are logged into your account click "Create Skill" on the right hand side.
- Give your skill any name, eg "My YouTube Skill", and click "Next".
- Choose "Custom" as your model, and click "Create Skill".
- On the left hand side, click "JSON Editor".
- Delete everything in the text box, and copy in the text from https://raw.githubusercontent.com/ndg63276/alexa-youtube/master/InteractionModel.json
- Click "Save Model" at the top.
- Click "Interfaces" in the menu on the left, and enable "Audio Player". Click "Save Interfaces".
- Click "Endpoint" in the menu on the left, and select "AWS Lambda ARN". Under "Default Region", put:
- Click "Save Endpoints"
- Click "Invocation" in the menu on the left.
- If you want to call the skill anything other than "youtube", change it here. Click "Save Model" if you change anything.
- Click "Build Model". This will take a minute, be patient. It should tell you if it succeeded.
- At the top, click "Test".
- Move the slider at the top left so that it says "Test is enabled for this skill".
Deploying yourself (optional, advanced)
This skill currently runs on my Lambda instance, hopefully it won't get too popular. If you want to, and know how, you can deploy it on your own Lambda, you just need the lambda_function.zip file, and a YouTube developer key. Upload the zip file to Lambda, add the environment variable DEVELOPER_KEY, and change the endpoint of your skill. If you do so, and don't mind some other people using your lambda instance, let me know and I'll put your ARN here.