Search code examples
amazon-web-servicesalexa-skills-kit

Unknown Slot types


I have just started looking into making a basic Alexa skill.

I want to create a skill that repeats what a user says. For example "Alexa, repeat 'hello'".

What slot type would I use for hello as I am unaware of what the user will say?


Solution

  • @Josep Valls answer is false:

    1. The Amazon.LITERAL Slot-Type can still be used. Amazon planned on removing it, but due to developer feedback reverted that decision. Here is the documentation.
    2. Even without the literal type you can catch everything an user says. This includes values that are not pre-defined. Quoting this:

    "When you create a custom slot type, a key concept to understand is that this is training data for Alexa’s NLP (natural language processing). The values you provide are NOT a strict enum or array that limit what the user can say. This has two implications 1) words and phrases not in your slot values will be passed to you, 2) your code needs to perform any validation you require if what’s said is unknown."