I was inspired to do this skill as a learning exercise. I need to use Alexa Conversations for some pretty complex skills and this was my first stab at getting the beta to work for me.
What it does
It's a simple enough skill as you ask Alexa to calculate your BMI and she asks you for your height and weight and calculates your BMI. The trick with this skill is that you might answer in feet and inches, centimeters, pounds, kilos or even stone. What's my BMI? handles all of those possibilities.
How I built it
I used the Alexa Developer Console to build the Voice User Interface (VUI) for this skill, and I used Python to write the Alexa-hosted backend code.
Challenges I ran into
I had a devil of a time figuring out how to get Alexa to recognize 2 part height and weight measurements, such as 6 foot 2, and 14 stone 6. I also had some difficulty figuring out how to exit the skill when it returned your BMI.
Accomplishments that I'm proud of
I'm proud of the way I solved the 2 part measurement problem. Instead of trying to use AMAZON.Number slots, I switched to using words and phrases, as in, "six foot two" and "fourteen stone seven". This allowed Alexa to match on the word or phrase and not worry about the actual numbers themselves. Translating the words to numbers was trivial once Alexa identified the Slot ID for the selected item. So instead of umpteen slots, I now have two: Height and Weight.
What I learned
I learned that there are many ways to configure Alexa and not all of them work.
What's next for What's my BMI?
What's my BMI is a jumping-off point. After this, I will be creating much more complex skills, probably leaning into the FinTech space with a market prediction Skill.