1

I am currently using Alexa skills and AWS lambda to create a custom skill. I am currently stuck on trying to get Alexa to ask a question back to the user for a response.

For example, I want Alexa to present a list of, let's say, books (which I have successfully done) and then I want Alexa to ask me to pick a book from that list and then listen to a response. Do you have any tips or can point me in the right direction for the part about asking and then listening for a response?

P.S. My AWS lambda function is in python currently so preferably help in python would be great, but I can also manage other languages as well.

Mefew
  • 33
  • 4

1 Answers1

1

Sounds like you want to ask the question at the end of the list. Tack it on.

When you present the list of books and ask the question, Alexa will automatically listen for a response unless you explicitly end the session.

On the "Build" tab in the developer console, go to the slot types. You can create a custom type with just your list of titles, or you can add the Amazon.BOOK slot type to your skill and use it as a slot.

Then create an intent, maybe name it "BookChoice," where the sample utterances contain {book}... "I want {book}," "tell me about {book}," etc. Then in the configuration for the intent, it will have a "book" slot which you can set to the Amazon.BOOK or custom slot type you created.

Add a handler for the "BookChoice" intent to your Lambda. Creating slots can be difficult, so I'm answering that. Handlers and getting slot values are intro tutorial stuff, so I won't go into that.

LetMyPeopleCode
  • 1,895
  • 15
  • 20