Steve Prior comments about his experience with speech recognition: "While I was exploring the possibilities with LumenVox, it occured to me that writing and maintaining a complex speech application would be easiest with a high level language rather than a normal Asterisk Dial Plan. Working with LumenVox to ensure compatibility with the FastAGI protocol has now enabled applications to be written in any of the languages with FastAGI bindings.

In my case I chose to use Stefan Reuter's asterisk-java project to write my LumenVox voice enabled application in Java. This has allowed me to write a speech application which uses J2EE technologies like CORBA and Hibernate database access to interface with my home automation system. The amazing part is that all of this works very well when calling through the hands-free functions of my car calling through my cell phone into a VOIP connection to my Asterisk server - even with the background noise level of highway speeds and snow tires!"

Serving Up Java on Asterisk

Author: Steve Prior

// The program starts off playing the Gino’s Pizza greeting and setting threshold for accepting Speech Recognition results.

PizzaOrder pizzaOrder = new PizzaOrder();
this.streamFile("GP-Greeting");
this.setVariable("THRESHOLD","500");
      
// Ask if delivery or take out

pizzaOrder.setDeliveryOrTakeout(ask("order", "GP-DeliveryorTakeout", "GP-NoDeliveryorTake-out", true, getThreshold()));

// Ask for Size 

pizzaOrder.setSize(ask("size", "GP-Size", "GP-NI", true, getThreshold()));

// Ask for Crust 

pizzaOrder.setCrust(ask("crust", "GP-Crust", "GP-NI", true, getThreshold()));
      
// Ask for Toppings

getPizzaTypeOrToppings(pizzaOrder);

// Confirm playing back the entire order  
 
speakOrder(pizzaOrder);

// Loop until everything looks good

String wasThisRight = ask("yes_no", "GP-WasThisRight", "GP-NI", true, getThreshold());

// If something was not right, then goto menu that fixes the order.
      
if (wasThisRight.equals("no"))
{
    pizzaOrder = getFixedOrder(pizzaOrder);
}

// Return the final order

return pizzaOrder;

// Common functionality in the each menu of the program is asking a question & getting an answer -- which is at or above a preset confidence threshold.
				

Resources


About the Contest

This is a quarterly contest to find sample application code, grammars, prompts and tools to post in this Asterisk Speech Application Zone. The panel of judges look for uniqueness and usability, and if your submission is chosen, you win free speech recognition software. Not only that, but you will be helping your fellow Asterisk community members speed up their application development process -- and you might find some useful code for yourself!

What is the prize?

5 LumenVox Speech Engine Lite licenses.

(a value of $1225)

Deadlines and Details?

The deadline to submit your entry is Oct. 15th. The winner will be contacted via email by Oct. 30th. Please send a brief description of your application, along with the sample code, grammars, prompts or tools to News@LumenVox.com. All submissions will be considered public domain, and could potentially be posted on the internet. Please only send original code, commented code preferred. LumenVox can not endorse or be held responsible for the performance of any submission.

Good Luck, and may the best application code win!