question

silicon_prairie avatar image
silicon_prairie asked

Literal Slots - Help

Hi All, We are working on a skill and I have some questions about the literal slot. We want our skill to be able to trigger an action in our mobile application - the issue is that the action we want to trigger is named by our users. What we want to do is use the literal slot to pass all the text to our Lambda skill so we can parse it and compare it to what the user named it in our app to perform the action. I know this goes against the recommended use of the literal slot, but the alternative would be limiting the user naming options in our app so that we can use a custom slot - not something we want to do just for Alexa. Has anyone had any luck or is it possible/allowed to have the literal slot pass the entire spoken phrase (after the utterance of course)? Here is what we were hoping to be able to do, where we would use place holder words for up to a six word phrase (just one utterance example) - PressButton push the {orange grape apple banana watermelon strawberry|buttonsOnly} PressButton push the {orange grape apple banana watermelon|buttonsOnly} PressButton push the {orange grape apple banana|buttonsOnly} PressButton push the {orange grape apple|buttonsOnly} PressButton push the {orange grape|buttonsOnly} PressButton push the {orange|buttonsOnly} IF this is not possible, is there another suggestion to keep us from limiting the name of the user defined action in our app? Can a custom slot be automatically updated with new options based on what users choose to name the action in our app? Thanks in advance.
alexa skills kitdebugging
10 |5000

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

jjaquinta avatar image
jjaquinta answered
I wish Amazon would add this to their FAQ... Alexa was not designed for general speech-to-text. It was designed to work with a restricted vocabulary defined by your utterances. You can trick Alexa into letting you create a "generic slot" using what you've done. But the quality of recognition will be poor. Unless users are particularly simplistic in their naming, you will almost certainly not get what is on their list. So you are going to have to do some sort of phonetic comparison (e.g. DoubleMetaphone) to compare what Alexa thought the user said, to the possibilities of the user might have said. As to your other question, no, you can't dynamically update your interaction model. It's been requested a number of times. You can go +1 any of the feature request threads asking for this. But I wouldn't build a business plan on it. ... Now, one way to work the problem is this. Don't let them use free form naming in your mobile app. If the name is purely abstract, you could pick, say, eight colors and eight animals, and let the user choose a memorable combination of the two (e.g. Purple Capybara). If it is, say, something like home automation, you can do the same, but make the first one a room type (living room, dining room, etc) and the second a function type (lights, temperature, etc). That will be more natural if that's what your functionality is. Back in your Alexa app, you now no longer need free form speech recognition. You can create one custom slot with the list of options for the first word, and a second slot for the options for the second word. Now you are back in the territory Alexa is good at. Yes, it isn't ideal for the users. But it might be the most usable choice if you want to go this route.
10 |5000

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

silicon_prairie avatar image
silicon_prairie answered
Thanks for the feedback. We have tested the custom slot option and it works well...it just isn't the ideal solution for us, although it may be the best one at the current time. I will definitely +1 the idea for being to dynamically update our interaction model.
10 |5000

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