Voice Recognition Experiment

Speaking of multiple choice…

This is really just an experiment at this point. But… What if you could SAY your answer to a question? Instead of selecting from four options? What if Storyline would recognize your answer and then react accordingly?

Generally, two types of people are reading this blog. If you’re Type A, you completely skip IKEA’s wonderful first page and hop to action. If you’re Type B, you nicely lay down the tools and nails and make sure you have everything before you start the assembly game.

If you’re Type A, here’s the link to play with the course. The only thing you need to have is Chrome on a PC. Currently, voice recognition probably won’t work on anything else.

If you’re Type B, here’s some explanation first:

The Travel Game

It started out with David Anderson’s template I found on eLearning Heroes. I wanted to modify the Travel Game, so I can say the answer to the trivia questions, rather than selecting one from four options.

First, I removed all the options and the Submit button. I also added some variables and triggers, so each question now had an answer that Storyline was expecting. The voice recognition comes from a webobject. I built that in the Construct 2 game engine. Then I added some JavaScript, so they can communicate with each other. The weboject is responsible for voice recognition, and Storyline is handling the game itself.

Travel Map

Once you click on a marker on the travel map, a question pops up trivia-style. For this experiment, there are no real questions, just placeholders. I also added the “answer” what the course is considering correct. You play around saying the correct answer or not.

Travel Game Layout

Travel Game Layout

Voice Recognition

How the voice recognition works is that you initiate access to your mic by clicking the Click to Speak button. Chrome will prompt you to authorize access to the mic (in the name of my site). 7-3-2015 7-03-42 PMOnce you authorize the access, the mic is on and voice recognition is working. You say the answer, and then click on Stop Listening.

Storyline & Construct 2 Webobject

Storyline & Construct 2 Webobject

The Construct 2 embedded webobject analyzes your voice, and tries to match it to an existing English word. Once the process is complete, it sends the results to Storyline. Storyline then fires a trigger and compares the correct answer to what you just said. This is an experiment only, rain and reign sound the same! Also, be careful what you say, there’s no bad word filtering at this point 🙂

Based on the result, Storyline either shows the Correct layer or the Incorrect layer with the recognized word. And then you can move on to the next marker. Enjoy the Speaking of Travel Game!

About the Author olahzsolt@hotmail.com

Leave a Comment: