alexa-skills-kitalexa-slot

Which Amazon Alexa slot/intent type do I use for regular string?


I am new to developing Alexa skills. I am working on app that has to understand acronyms. Like: BTW, TMI, CCDX, BA.

Since Alexa can't recognize these too well, my ideas was to spell it out using the military alphabet and have my code parse the 1st letter of each word to get the acronym. For example, for CCDX, I'd say:

"Alexa get Charlie Charlie Delta X-ray" so that my code would parse C.C.D.X. and then run a function based on that value and return results.

I am looking at the possible slots and doesn't look like I can just have a "String" type slot? Which slot type should I use, if this is possible, to have it pass my alphabet phrase (charlie charlie delta x-ray)?

Thank you kindly.


Solution

  • Solution 1:

    When you speak out acronyms like BTW, TMI, etc. Alexa takes it as b.t.w., t.m.i. You can use AMAZON.CreativeWorkType slot to catch any string you speak. Split [b.t.w] by "." and retrieve your acronym.

    Solution 2:

    Make custom slottype and enter all the alphabets as separate slot values. To make the slot type more efficient, also write synonyms like for letters eg. B- b.,B., bee, bea,be. C - c.,C.,sea, cee, and so on.

    custom slotname - alphabet

    Utterences should be like this {alphabet}{alphabet} for 2 letter acronym. For 3 letter acronyms it should be like this {alphabet}{alphabet}{alphabet} and so on.

    In the backend you will get values like b.a.c, B.t w. etc. You have to split and separate them, remove the dots if any and convert to a particular case.

    Try this out and let me know if it works, otherwise we shall find something else.