0

How to set up slots with AMAZON.StartOverIntent utterance?

Ex: I want to start the skill with a custom slot value as in Alexa, ask <my skill> the definition of <custom value>

I read that AMAZON.StartOverIntent cannot have custom slot so I broke it like this:

DefIntent {Term}
AMAZON.StartOverIntent the definition of
AMAZON.StartOverIntent define
AMAZON.StartOverIntent what is

That doesn't seem to work when I test it with Echo. How do you go about declaring such utterance?

xoail
  • 2,978
  • 5
  • 36
  • 70

1 Answers1

0

Why are you trying to override StarOverIntent? The normal way to do things is to use your own intents. You only need to use the built in intents if you want to. And, even then, it is just a short cut. You still have to implement them. They don't actually come with in built in functionality.

For what you want, you can declare the following intent:

{
   "intents":[
      {
         "intent":"DefIntent",
         "slots":[
            {
               "name":"term",
               "type":"TERM"
            }
         ]
      }
    ]
}

This creates one intent with one slot which is a custom type TERM. You can create the list of terms you want to look up in plan text file and upload it as the values for that custom type. You can then declare utterances:

DefIntent the definition of {term}
DefIntent define {term}
DefIntent what is {term}

That should give you what you want.

Or close to what you want. I imagine you want the user to be able to say anything at all for {term}. But Alexa is not a dictation machine. It doesn't work that way. It expects a moderately restrictive vocabulary in order to produce the highest quality recognition.

You can fake it out, by providing a custom list with a hundred thousand words in it. Or other techniques to create a "generic slot". But it will not perform with a high quality of recognition. You are better off re-thinking your design so that you don't need generic dictation.

For a fully worked, complex example of an Alexa skill, with nearly an hour of video, see SubWar.

Joseph Jaquinta
  • 2,118
  • 17
  • 15
  • Thanks for clarification. Basically I am trying to create a generic slot. Are you saying that my use case will never work especially when the {term} could be any of the thousands of values. I just want to allow users to check for a definition without me specifying each and every one of the possible term in slot values. – xoail Jul 25 '16 at 00:57
  • Alexa was not designed to be a dictation machine. You can trick it into doing it, but that is outside its design parameters. It will not perform well. If you just want to do a demo, that's fine. Record it multiple times until it hears you correctly or tune it to your voice. But for a wide use skill, it is not recommended. If you search the developer forum for "Generic Slot" you will find a long discussion of the pros and cons. – Joseph Jaquinta Jul 25 '16 at 12:14