1
votes

I am trying to make a slot that can capture one word. I just want the whole directive to be one word long, and any English word will trigger the intent. I tried using Amazon.LITERAL but that can capture a whole phrase, which is not what I want. Is there any way to do this in Alexa?

1

1 Answers

0
votes

There is not a way currently to limit the number of words returned in a slot.

You can prompt the user in a way that makes it clear that you only expect a single word, and your lambda code can verify that only a single word is provided in the slot.

For example, have Alexa say "tell me a word that ... you can say 'alexa, tell your-skill-name that the word is lucky'". You might say this for example during the LaunchRequest.

You can then verify that only one word was specified in the slot, and reprompt as needed.

The intent for the answer could look something like "MyWordIntent the word is {Word}"