ICP 3 - Hiresh12/CS5551_Team6_1_17_ICP_1 GitHub Wiki

Team Details

Team-6

  1. Hiresh Jakkala Bhaskar(class id - 17)
  2. Bharath Kumar Eilane(class id - 12)

Objective

1.Need to get Nutritionix and IBM Watson text to speech API’s key by creating account in https://developer.nutritionix.com/ and https://console.bluemix.net/docs/services/text-to-speech/getting-started.html 2.To create a web page that should have text fields to get recipe name as input and pass that input through Nutritionix api' and get Calorie and serving weight as response and display it in the web page and to play the audio response from IBM Watson text to speech API.

Nutritionix : https://api.nutritionix.com/v1_1/search/“Your search term”?results=0:1&fields=*&appId=”Your app ID”&appKey=”Your API key”

IBM Watson text to speech : https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize?username=f61d1286-72ec-4d67-a0a2-16969a62acac&password=4AmGC8jSSy5G&text=”Your search term”

Code Explanation

UI

UI code has been developed using AngularJS and Bootstrap framework. HTML text elements is used to get the input.

API Call

Angular Http call is implemented which will send request to the server and gets a response from the server. AngularJS ng-model is used to bind the input values to the variables and will be send along with request URL.

Output

Used Angular ng-bind directive to display output data in table.

UI Validation

Validation is implemented to alert user if textbox is left blank. I sent the error message as a API request to IBM Watson text to speech API and conveyed that error to user as audio.

Conclusion

Finally web page has been created to display calorie and serving weight of a recipe through Nutritionix and used Watson Text to speech API to speak out the searched keyword.

Video Link

https://youtu.be/Wa3RWnglsoM