Predix – Integration with Alexa Voice Service

Asset Details

This Topcoder challenge was focused on creating a simple survey app that integrates Predix with Amazon Alexa Voice Service (AVS). Check out the original challenge and dive into the winning Asset details below.

Congratulations to maxceem for taking first place in the challenge and providing us with his “winner’s asset details and description”.

https://github.com/topcoder-predix/alexa-avs

Winner's Asset Details & Description

The main idea of this application is to implement a survey with which user can interact via voice. We have surveys that are stored in the Predix asset service in text format, and when a user visits our web-based application they can choose a survey to complete. After that, they can listen to the survey questions and give answers by voice, during which time the user’s replies are recognized and stored in the Predix asset service.

Leveraging Amazon’s Alexa Skills

To synthesize speech from text and recognize voice answers back to text, we use Amazon’s Alexa by implementing an Alexa Skill to provide some additional features. For instance, instead of dummy speech-to-text recognition, Alexa tries to understand our intent when we say something. Thus during a survey, we can ask Alexa, What is the weather?”, “How are you?”, or “What time is it now?” and she will reply, rather than treating our question as an answer. So it’s like completing a survey with a real person. Also, not only can users complete surveys using our web app, but they can also do so by using any AVS-enabled device, like Amazon Echo (though with some nuances).

Alexa Skill retrieves survey questions from the Predix asset and, after recording the answers, our web app simply implements the AVS device, which allows interaction with Alexa. Taking this into account, we cannot identify which survey, in particular, a user wants to complete. But luckily, we host our Alexa Skill code and our front-end code using the same server hosted in the Predix Cloud. By using this feature we can pass the ID of the chosen survey from the front end to Alexa Skill. However, this method has some drawbacks. Alexa Skills doesn’t let us identify the user, so when anyone chooses a survey using front-end code, it affects all of the users interacting with the Alexa Skill.

The diagram below shows how app components interact with one another:

Topcoder Winner

Ukraine

Technologies

Angular.js node.js Predix Reactjs

Platforms

Node.js Predix
Download

Are you ready for Predix?