I am developing a simple, custom skill for Alexa. I have it up and running, and hosting the handler on AWS Lambda. It's working fine except...
In the test UI, if I enter a valid utterance, e.g., help, cancel, swim, run (two custom utterances), everything works well; however, if I enter a nonsense utterance, e.g., dsfhfdsjhf, the Alexa service always maps the nonsense to the first valid intent in the intents schema.
In my lambda code, I have a handler for handling unknown intents; however, the intent is never unknown. Is this an artifact of the test interface? Something else happening?
Thanks, John
The sample utterances are set of likely spoken phrases mapped to the intents. For details and code examples that show how you access intents and slots sent in user requests during skill runtime, see Handle Requests Sent by Alexa.
js, Java, Python, C#, Go, Ruby, or PowerShell. You can author a web service in any language appropriate for web services. If you choose the Alexa-hosted skill option, you write your code in Node. js and Python.
You can easily enable this feature by saying, “Alexa, turn on Conversation Mode” or “Alexa, join the conversation.” Once the mode is enabled, anyone in the room can speak with Alexa without saying the wake word, as long as they're in view of the device's camera and looking toward the screen.
Based on the inclusion of an unhandled intent in your approach, it sounds like you are using the Alexa Skills Kit SDK for Node.js. Your issue is not an artifact of the test interface. Yes, something else is happening.
While not yet acknowledged by amazon, this is a recognized issue in the SDK by a number of folks. See this open issue. Speaking from personal experience to the suggestion above, it doesn't matter if you use real words or gibberish, the unhandled intent is never called. Until this is fixed, my suggestion would be to build a handler that is a high level prompt for your skill, and reiterates for the user the valid options they have. Position it to be the catch-all. Hopefully we will see better maintenance of this SDK moving forward.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With