Announcement: The Alexa Skills Community Is Moving To Stack Overflow

For improved usability and experience, Alexa skills related forum support will be transitioned to Stack Overflow. Effective January 10, 2024, the Amazon Developer Forums will no longer be available. For continued Alexa skills support you can reach out to us on Stack Overflow or via Contact Us.

question

natejgreene01 avatar image
natejgreene01 asked

Numbers within an utterance.

I am running into problems with a slot of type NUMBER. I have the following: Intent Schema: { "intents": [ { "intent": "RunOnceIntent", "slots": [ { "name": "Zone", "type": "NUMBER" }, { "name": "Duration", "type": "NUMBER" } ] } ] } Utterance: RunOnceIntent activate zone {four|Zone} for {four|Duration} minutes The utterance gets me "activate zone for for four minutes." It is also a problem with "two" for the zone. It seems like it is all about context within the utterance on how the voice recognition picks which version of the word to use since the second slot works fine. I saw another post on here from last month that looks like it was supposed to be fixed ( https://forums.developer.amazon.com/forums/thread.jspa?threadID=5139&tstart=0). Anyone else still having the same issue? Any tips on how to get this to work? Thanks
alexa skills kitvoice-user interface
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JamesQMurphy avatar image
JamesQMurphy answered
I tried playing around with your utterance and I couldn't even get it to work, but that's probably on me. I"ll say this: I've seen suggestions here for putting the word "number" in front of the slot. I tried this with one of my own utterances and I got much better results. The best part is that you don't even have to say the word number. Perhaps you can try this: RunOnceIntent activate zone number {four|Zone} for {four|Duration} minutes and then try saying this: "Alexa, tell MyApp to activate zone four for four minutes."
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jamie Grossman avatar image
Jamie Grossman answered
Hi there, Thanks for the post. I believe you're right. Sometimes, it does depend on the context of the conversation between yourself and Echo for Alexa to know what you're trying to do. If you run into issues like this, I'd suggest trying to rephrase the sample utterance to something that would be easier for it to understand (ie. not having similar sounding words after each other). Regards, Jamie
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

natejgreene01 avatar image
natejgreene01 answered
I would still like to understand why it would not understand this a little more. "2" in the slot that is designated as a NUMBER type: "Activate zone to for 10 minutes" or "Activate zone number to for 10 minutes" does not work. I would think that if a slot is of type number "to","two", or "too" would all evaluate to 2. Is that not the way the utterances work? Thanks!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Gardner avatar image
Nick Gardner answered
Natural language processing is a complicated topic, and it is often difficult to say the exact outcome of an intent without doing actual testing on it. Especially in circumstances where there are multiple seemingly valid results, that often requires even more testing. In this case, there seem to be issues because the sentence still mostly works when interpreted without the "to" being a number. As said, some way of rewording the utterance so that the for four two to too stuff are in different parts of the sentence will likely help. -Nick
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Nick Gardner avatar image
Nick Gardner answered
Hi, There has been a fix deployed recently which improved number recognition. Could you please try putting your preferred utterances in your skill in the Developer Portal and saving it? You can then test it to see if the specific issues you were seeing have been fixed. Thanks, Nick
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.