DietHelper

An Alexa skill that allows users to ask if certain foods can be eaten with certain dietary restrictions.

Inspiration

All of us know people personally with one or more dietary restrictions, and we thought that there should be an easy way for these people to find out what foods they can eat. We thought an Alexa skill would be an easy way to quickly have questions about dietary restrictions answered.

What it does

DietHelper allows users to ask if a specific food product adheres to a specific dietary restriction, or if a food product contains a specific ingredient. Some sample question and answers include:

Q: "MyDietHelper, does Diet Coke contain sugar?"

A: "No, I found that Diet Coke cola does not contain sugar."

Q: "MyDietHelper, are rice crispy treats gluten-free?"

A: "No, I found that Kellogg's Rice Crispy Treats Original are not gluten-free."

Q: "MyDietHelper, are Nutter Butters vegan?"

A: "Yes, I found that Nutter Butter Creme Patties are vegan."

Q: "Ask MyDietHelper if Barefoot Wine is Whole 30."

A: "No, I found that Barefoot Wine Moscato is not Whole 30."

Q: "Ask myDietHelper if Wonder Bread contains high fructose corn syrup."

A: "No, I found that Wonder Bread - enriched does contain high fructose corn syrup."

Diets supported by DietHelper:

Dairy Free, Gluten Free, Nut Free, Peanut Free, Seafood Free, Shellfish Free, Wheat Free, Peanut Free, Soy Free, Grain Free, Sesame Free, Keto, Peleo, Vegan, Vegetarian, Pescetarian, Primal, Whole 30

How we built it

We used the Spoonacular Food API as the backend to get data about food products. We used Java to connect with Alexa and translate users' "utterances" into "intents". This means that we would call specific Java classes based on what kind of input the user gives to produce different answers. We would pass these classes the food, diet, or ingredient the user says as needed in order to produce the expected result.

Challenges we ran into

We ran into many challenges regarding speech recognition with Alexa. Because we can't predict every possible food product that the user will ask Alexa about, it was difficult to make her differentiate between foods and diets when they were being said back-to back. We were able to get much better results after tweaking the settings.

We also ran into many unexpected bugs during this process. We were having trouble where Alexa would refuse to say certain answers even though we could see she was getting the correct answer. After a long time, we realized that she couldn't recognize the "&" symbol in the names of the products and we had to replace these with "and".

We also had a stretch goal to ask users for all of their dietary restrictions, save these, and then the user could simply ask "Alexa, can I eat ___?" We ran into problems connecting with the database we made, so we were never able to implement this functionality. However, we may try to add this feature in the future.

Also, one of our members was not able to build a JAR file and another member's computer stopped turning on. But we got through it!

Accomplishments that we're proud of

We made our first Alexa skill and it does what we set out to do! While we were not able to reach all of our stretch goals, we had some extra time to tweak our application to make it work better and give better results.

Built With

Share this project:

Updates