Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Setup Process (Old)

David Hacker edited this page Apr 5, 2018 · 1 revision
  1. Go on https://developer.amazon.com/ and log in with a developer account. Navigate to the "Alexa" tab and click on "Alexa Skills Kit."
  2. Click on "Add Skill." You will be taken to a setup menu.
  3. Skill Information page: give the skill a name you choose. For Invocation Name, put 'youtube' and in the Global Fields section, mark that the skill uses audio player directives.
  4. Interaction Model page: put the following under Intent Schema.
{
  "intents": [
    {
      "slots": [
        {
          "name": "VideoQuery",
          "type": "VIDEOS"
        }
      ],
      "intent": "GetVideoIntent"
    },
    {
      "intent": "AMAZON.PauseIntent"
    },
    {
      "intent": "AMAZON.ResumeIntent"
    },
    {
      "intent": "AMAZON.StopIntent"
    },
    {
      "intent": "AMAZON.RepeatIntent"
    },
    {
      "intent": "AMAZON.LoopOnIntent"
    },
    {
      "intent": "AMAZON.LoopOffIntent"
    }
  ]
}

Next, in the Sample Utterances section, put this.

GetVideoIntent search for {VideoQuery}
GetVideoIntent find {VideoQuery}
GetVideoIntent play {VideoQuery}
GetVideoIntent start playing {VideoQuery}
GetVideoIntent put on {VideoQuery}

4b. Note for German users, under Intent Schema, replace "GetVideoIntent" with "GetVideoGermanIntent". Substitute this in replace of the English commands:

GetVideoGermanIntent suche nach {VideoQuery}
GetVideoGermanIntent suche {VideoQuery}
GetVideoGermanIntent finde {VideoQuery}
GetVideoGermanIntent spiele {VideoQuery}
GetVideoGermanIntent spiele {VideoQuery} ab
GetVideoGermanIntent gib {VideoQuery} wieder
GetVideoGermanIntent fange {VideoQuery} an zu spielen
GetVideoGermanIntent fange an {VideoQuery} zu spielen
GetVideoGermanIntent zeige {VideoQuery}
GetVideoGermanIntent starte die Wiedergabe von {VideoQuery}
  1. Add a custom slot type called VIDEOS. Under "Values", put:
prince
the fray
the rolling stones
toad the wet sproket
KC and the sunshine band
john travolta and olivia newton john
DJ jazzy jeff and the fresh prince
lola
hello dolly
love me tender
fools gold
roberta flack killing me softly with his song
stevie wonder superstition
boston
full circle
dubstar
underworld
orbital
let me be your fantasy
pop will eat itself
ultra nate
4 hours Peaceful and Relaxing Instrumental Music
  1. Configuration page: under Endpoint, select AWS Lambda ARN (Amazon Resource Name) as the Service Endpoint Type. Select North America/Europe depending on where you are. In the field that pops up, leave that blank for now. We will come back to that once the skill has been uploaded to Lambda. Also, under Account Linking, make sure that 'no' is checked.
  2. Now it's time to set up Lambda. Log on to your AWS account and select "Lambda" from the main console menu. Make sure your region is set to N. Virginia (North America) or EU-Ireland (Europe).
  3. Click on "Create a Lambda function" in the Lambda console menu. For the blueprint, select alexa-skills-kit-color-expert.
  4. Configure the function. Give it a name like "alexaYoutubeSkill" and fill in an appropriate description. Assign it to a role with at least S3 read permissions. Make sure that the skill is using Node v4.3. Leave the rest the default skill for now.
  5. Click here to download alexa-youtube-skill.zip, which contains all the code for the Lambda server.
  6. Now, go back to the Lambda function you just saved. Under "Code entry type," select "Upload a ZIP file." Then, upload alexa-youtube-skill.zip under "Function Package."
  7. You will now need to fill out the required environment variables:
Key Value
ALEXA_APPLICATION_ID found under Skill Information under your skill in Amazon Developer
HEROKU_APP_URL OPTIONAL the URL for the Heroku intermediary server. Defaults to https://dmhacker-youtube.herokuapp.com if this variable is not included. Otherwise, you can choose to setup and use your own server.
  1. Under "Configuration" -> "Advanced Settings" in your Lambda server, go to the "Timeout" section. Change the timeout duration from 3 seconds to >= 1 minute.
  2. The last step is linking your Lambda function to your Alexa skill. Go back to Alexa under Amazon Developer and find your skill. In the Configuration page, put the Lambda ARN name in the blank spot that you left earlier.
  3. Go to the Test page and set Enabled to true. The skill will now work exclusively on your devices.
Clone this wiki locally