The LumenVox Pizza Demo is an application written in the Asterisk Dial Plan that uses the LumenVox Speech Engine. It is meant to demonstrate how to use speech recognition functions in Dial Plan. It also makes use of speech recognition in AGI, the Asterisk Gateway Interface. If you would like to see what it sounds like, you may call our demonstration hotline to interact with a version of it.
The LumenVox Pizza Demo assumes you have some knowledge of working with the Asterisk Dial Plan. The Asterisk Web site contains more information about working with extensions.conf and the Dial Plan.
You will need the LumenVox Speech Engine for Asterisk installed in order to use the demo application.
Once you have download the file, uncompress it to a working directory. You will have to place the files in the proper directories.
;This is the entry point for the pizza demo IVR
;To open a port the the Speech Engine you need
;to do a SpeechCreate first before you can do any
;of the other Speech applications
[pizza]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,SpeechCreate
exten => s,4,Goto(order-pizza,s,1)
[order-pizza]
exten => s,1,Playback(GP-Greeting)
;The THRESHOLD is a value compared to the
;SPEECH_SCORE(x), which is the confidence score
;returned by the Speech Engine.
exten => s,2,Set(THRESHOLD=500)
exten => s,3,Goto(pizza-delivery,s,1)
;This context will get whether the caller
;requests delivery or takeout [pizza-delivery]
exten => s,1,SpeechActivateGrammar(order)
exten => s,2,SpeechStart
exten => s,3,SpeechBackground(GP-DeliveryorTakeout)
;If there are no results (no input) then we re-prompt them.
exten => s,4,GotoIf($["${SPEECH(results)}" = "0"]?5:7)
exten => s,5,Playback(GP-NoDeliveryorTake-out)
exten => s,6,Goto(2)
exten => s,7,Set(TEXT=${SPEECH_TEXT(0)})
;If the confidence score is below the threshold then we confirm the intent
;of the spoken phrase.
exten => s,8,Gotoif($[ "${SPEECH_SCORE(0)}" > "${THRESHOLD}" ]?12:9)
exten => s,9,Macro(speech-confirm,${SPEECH_TEXT(0)})
exten => s,10,GotoIf($["${CONFIRM}" = "no"]?3:11)
exten => s,11,Noop(speech_score=${SPEECH_SCORE(0)})
;If the intent has been confirmed then the type of order is fixed
exten => s,12,Set(TYPE_OF_ORDER=${TEXT})
exten => s,13,SpeechDeactivateGrammar(order)
exten => s,14,Noop
exten => s,15,GotoIf($["${ARSO}" = "1"]?16:17)
exten => s,16,Goto(confirm-order,s,1)
exten => s,17,Goto(pizza-size,s,1)
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!
5 LumenVox Speech Engine Lite licenses.
(a value of $1225)
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!