Reputation: 979
When making an Alexa App that is going to query a web service, how do you get what to query without defining a custom slot? If I wanted to get more information about a zip code or a title from IMDB, I want to be able to get the zip or title that I am trying to query. For example, if I make a skill and ask Alexa, "What is the weather in 49837?" How would she know that 49837 is my "slot" without defining it in a list beforehand?
From what I am reading, I must add every single zip code into a custom slot and the same for IMDB. This is unlike many other services which can be trained to recognize different values as seen in Wit.ai.
I'd appreciate any help that you can provide!
Upvotes: 1
Views: 235
Reputation: 2138
Alexa is not designed to be a general purpose dictation machine. When designing a speech to text applications you can choose for something that supports a wide vocabulary with a low accuracy, or a narrow vocabulary with a high accuracy. As Alexa is aimed at the consumer market, Amazon choose to go for a narrow vocabulary with a high accuracy. Consequently you need to define your audio interface ahead of time. And, yes, this means you need to pre-load it with all anticipated input.
That being said, the more info you give Alexa, the broader it will interpret the input. A custom slot is not restricted to what's on the list you give it. It will return things off the list if it was pretty sure that's what was said and it seems like the sort of thing you had on your list. So, if you present a huge list, you can force Alexa to recognize a wide range of values.
This is called a "generic slot". If you do it, however, it will not perform well. As above, the accuracy will go down. If you just want to do a demo to impress someone, where you can do several takes and edit out the ones that don't work, then this is fine. If you want to produce a quality skill that is used by a wide audience, then you need to re-think your design. It just isn't what Alexa was made to do.
Upvotes: 2