Idea for an Alexa Skill

I’ve been playing around with making it easy to log what I eat/drink, together with calories. The idea is that logging what you eat can be tedious, and prone to “I’ll do that later (oops forgot)”. By doing it with a voice interface, I can do it anywhere, and quickly and simply. I can even do it over my phone, using the Alexa app.

At the moment, I have a Heath Robinson solution, using an existing skill, Tweet It, then using the Tweets it creates to log to a spreadsheet. But ultimately, I think I am going to use this to learn how to program my own Alexa skills

At the moment, this is how I think my skill should work.

“Alexa, call [skill name]

Alexa greets and ask which food has been eaten then does the following:

  1. Compares against a list of common foods held in Google Sheet. I am using a spreadsheet as a simple and easy to update database. This may change.
  2. If it finds an exact match, Alexa looks up the calorific value, writes to the log worksheet of the spreadsheet, then comes back and confirms

    “I’ve logged [item] at [kcals].”

  3. If it finds a partial match (for instance: “Tea, Earl Grey, Hot” contains “Tea”), then it first comes back and says

    “I think you mean [looked-up item]. Is this correct?

    If yes, then

    “I’ve logged [item] at [kcals].”

    If no then it starts again.

  4. If it finds no match, Alexa first checks it heard correctly.

    “I think you said [item] Is this correct?”

  5. If yes, it then asks for the (food) calorific value

    “How many calories?”

    followed by

    I heard [kcals]. Is this correct?

    If correct, then

    “I’ve logged [item] at [kcals].”

    If not, it asks for the kcal figure again.

  6. When you have finished an entry, Alexa adds

    “Do you have another entry?”

    At which point you can say “Yes” and start a new item, or say “No” to exist.

At any time you can exit, by saying “Exit” or “Stop”.

I know there are a lot of confirmation stages, but it is important to check that Alexa has heard “White Tea”, and not “Right T”. As I plan to use this mainly on my Echo Show devices (one in the office, one in the kitchen), you should get a nice clear written confirmation of what is being logged (however, the skill will work on the other Echo devices, but with that level of uncertainty you have with parsing voices).

It’s still at the thought stage at the beginning, as I have no idea what writing an Alexa Skill entails. But I don’t think I have too many false expectations – there is not much there that I haven’t seen other skills do.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *