[asterisk-speech-rec] SpeechBackground Problem

Adam Robins arobins at PharmaCentra.com
Wed Oct 11 13:28:32 MST 2006


I've set up the following dialplan logic to test the Asterisk/Lumenvox
speech engine using a simple yes/no grammar.
If the SRE does not detect a valid 'yes' or 'no', I play a message and
then loop back to try again.  For some reason,
when I loop back to the SpeechBackground command after the first time
through, the audio from the "test-say-yes-or-no" 
file is not audible, although the CLI shows it playing.  Any ideas?
Thanks.
 
 
exten => 6000,1,Answer
exten => 6000,n,SpeechCreate()
exten =>
6000,n,SpeechLoadGrammar(yesno|/etc/asterisk/grammars/yesno.gram)
exten => 6000,n,SpeechActivateGrammar(yesno)
exten => 6000,n,SpeechStart()
 
exten => 6000,n(ask),Wait(1)
exten => 6000,n,SpeechBackground(test-say-yes-or-no|3)
 
exten => 6000,n,NoOp(SPEECH(status)=${SPEECH(status)})
exten => 6000,n,NoOp(SPEECH(spoke)=${SPEECH(spoke)})
exten => 6000,n,NoOp(SPEECH(results)=${SPEECH(results)})
exten => 6000,n,NoOp(SPEECH_SCORE(0)=${SPEECH_SCORE(0)})
exten => 6000,n,NoOp(SPEECH_TEXT(0)=${SPEECH_TEXT(0)})
exten => 6000,n,NoOp(SPEECH_GRAMMAR(0)=${SPEECH_GRAMMAR(0)})
 
exten => 6000,n,GotoIf($[${SPEECH(spoke)} = 0]?done)
exten => 6000,n,GotoIf($["${SPEECH_TEXT(0)}" = "yes"]?yes)
exten => 6000,n,GotoIf($["${SPEECH_TEXT(0)}" = "no"]?no)
 
exten => 6000,n(bad),Wait(1)
exten => 6000,n,Playback(test-invalid-try-again)
exten => 6000,n,Goto(ask)
 
exten => 6000,n(yes),Wait(1)
exten => 6000,n,Playback(test-you-said-yes)
exten => 6000,n,Goto(done)
 
exten => 6000,n(no),Wait(1)
exten => 6000,n,Playback(test-you-said-no)
exten => 6000,n,Goto(done)
 
exten => 6000,n(done),SpeechDeactivateGrammar(yesno)
exten => 6000,n,SpeechUnloadGrammar(yesno)
exten => 6000,n,SpeechDestroy()
exten => 6000,n,Hangup

 
 
_____________________________________________________________ 
ADAM S. ROBINS, CCP
Executive Vice President and CIO

PharmaCentra, LLC
5901B Peachtree Dunwoody Road, Suite 380
Atlanta, GA 30328

Office:  770.395.0088 x2034
Mobile:  770.855.1360
Fax:      770.395.0989
Email:    arobins at pharmacentra.com
Web:     http://www.pharmacentra.com <http://www.pharmacentra.com/> 
_____________________________________________________________ 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-speech-rec/attachments/20061011/5855789c/attachment.htm


More information about the asterisk-speech-rec mailing list