alexa skill user input for spelling out letters

别说谁变了你拦得住时间么 提交于 2019-12-01 21:11:34

It isn't very well documented, but you can use "a.", "b.", "c." etc to represent the letter, as opposed to the sound. Create a custom slot and use these as the values. That should do you for the slot.

For the intent, create an intent with, say, five slots, all with the same slot type. Create five utterances against the intent, with one, two, three, four and five slots filled. When the user spells something, the intent will be invoked. Any slots the user did not specify will be null.

Having two slots in one intent not separated by a word often does not perform well. But try it and see. With a restricted vocabulary like this, it could do OK.

Lastly, if it has trouble distinguishing, say, "b." and "v.", you might try adding NATO call codes to your list. Alpha, Bravo, Charlie, etc. Then, in your processing, just take the first character of whatever value comes in for the slot.

You might enable the "Star Lanes" skill and experiment with the "Set Call Sign to X Y Z" intent. I do the above in that skill and it works fairly well.

I would avoid this kind of interface because it can be difficult for users to spell things, and difficult for Alexa to differentiate letters (b or v, perhaps). But if you want to try this, consider using the literal type and asking for letters in groups of three or four.

AV: "Spell the first four letters now"

User: "see ay are tee"

AV: "You spelled C, H, R, T. Would you like to add more letters, make a correction or search now?"

User: "Cancel. I'll just use my damn phone."

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!