0

i wrote a simple Q&A Alexa skill which ask the user to guess about the planet name based on its property.

questions are like "Which is the brightest planet in the solar system"

when user respond as Venus. Alexa says that the answer is incorrect. the correct answer is venus.

I am not sure why cant it recognize.

Vik
  • 8,721
  • 27
  • 83
  • 168
  • what does your code look like? what have you tried? what troubleshooting steps have you gone through? – Malachi Jul 22 '16 at 18:38

1 Answers1

1

There are a few places things can be going wrong.

1) Just because the user said it, doesn't mean that's what Alexa heard. Did you confirm in the companion app that Alexa heard the word "venus"? Did you try the simulator and type in Venus? That would get past it parsing what you said.

2) How are you testing the answer? Alexa, typically, returns things in lower case, since there is no casing in spoken language. Venus is a proper name, so I'm not sure it would return it as upper case or lower case. Either way, if you are using a case sensitive string compare then you need to make sure the cases match, or else use a case insensitive string comparison. If you are using Javascript, tips on doing case insensitive comparisons are here.

3) How are you recognizing the answer? Do you have a separate intent for "Venus"? Do you have a slot for it? Do you use a LITERAL with multiple utterances for examples? Do you use a custom slot? Each of these will return the results in different ways. The best option is to use a custom slot.

4) Have you checked your log files? What is your code actually receiving from Alexa? If your code doesn't print it, add extra log statements to see what your code is getting, and what you are doing with it.

You have not given enough information in your question to answer it definitively. Hopefully the above will give you ideas how to work the answer out yourself, or will prompt you to update your question with better information.

Community
  • 1
  • 1
Joseph Jaquinta
  • 2,118
  • 17
  • 15