[asterisk-speech-rec] First attempt not working

Adam Robins arobins at PharmaCentra.com
Tue Oct 10 10:04:43 MST 2006


I am trying to use my new Asterisk/Lumenvox install for the first time.
I set up extension 6000 to ask "Please say yes or no", and based on the
response, I playback 'yes', 'no' or 'invalid'.  Unfortunately, it keeps
coming back as invalid.  The variable ${SPEECH(results)} keeps coming
back as "0".  
 
Following are the setup (yesno.gram, extensions.conf) and the results
(Asterisk CLI, and Lumenvox SRE log).  The only error is in the SRE_Log.

 
Any assistance would be appreciated.
 
Also, I've read about 'tuning' Lumenvox, but I don't see any utilities
to do that.
 
Thanks,
Adam
 
 
 
/etc/asterisk/grammars/yesno.gram
 
#ABNF 1.0;
language en-US;
mode voice;
tag-format <lumenvox/1.0>;
root $yesorno;
$yes = yes;
$no = no;
$yesorno = $yes | $no;

 
extensions.conf:
;
; Speech Rec Stuff
;
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,SpeechBackground(please-answer-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_TEXT(0)}" = "yes"]?yes)
exten => 6000,n,GotoIf($["${SPEECH_TEXT(0)}" = "no"]?no)
exten => 6000,n,Playback(invalid-response)
exten => 6000,n,Goto(done)
exten => 6000,n(yes),Playback(got-yes)
exten => 6000,n,Goto(done)
exten => 6000,n(no),Playback(got-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

 
cli output of test:
 
[Oct 10 11:19:20]     -- Executing [6000 at international:1]
Answer("SIP/OB-0968d0f8", "") in new stack
[Oct 10 11:19:20]     -- Executing [6000 at international:2]
SpeechCreate("SIP/OB-0968d0f8", "") in new stack
[Oct 10 11:19:20]     -- Executing [6000 at international:3]
SpeechLoadGrammar("SIP/OB-0968d0f8",
"yesno|/etc/asterisk/grammars/yesno.gram") in new stack
[Oct 10 11:19:20]     -- Executing [6000 at international:4]
SpeechActivateGrammar("SIP/OB-0968d0f8", "yesno") in new stack
[Oct 10 11:19:20]     -- Executing [6000 at international:5]
SpeechStart("SIP/OB-0968d0f8", "") in new stack
[Oct 10 11:19:20]     -- Executing [6000 at international:6]
SpeechBackground("SIP/OB-0968d0f8", "please-answer-yes-or-no|3") in new
stack
[Oct 10 11:19:20]     -- Playing 'please-answer-yes-or-no' (language
'en')
[Oct 10 11:19:23]     -- Executing [6000 at international:7]
NoOp("SIP/OB-0968d0f8", "SPEECH(status)=1") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:8]
NoOp("SIP/OB-0968d0f8", "SPEECH(spoke)=1") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:9]
NoOp("SIP/OB-0968d0f8", "SPEECH(results)=0") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:10]
NoOp("SIP/OB-0968d0f8", "SPEECH_SCORE(0)=") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:11]
NoOp("SIP/OB-0968d0f8", "SPEECH_TEXT(0)=") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:12]
NoOp("SIP/OB-0968d0f8", "SPEECH_GRAMMAR(0)=") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:13]
NoOp("SIP/OB-0968d0f8", "yesorno=") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:14]
GotoIf("SIP/OB-0968d0f8", "0?yes") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:15]
GotoIf("SIP/OB-0968d0f8", "0?no") in new stack
[Oct 10 11:19:23]     -- Executing [6000 at international:16]
Playback("SIP/OB-0968d0f8", "invalid-response") in new stack
[Oct 10 11:19:23]     -- Playing 'invalid-response' (language 'en')
[Oct 10 11:19:24]     -- Executing [6000 at international:17]
Goto("SIP/OB-0968d0f8", "done") in new stack
[Oct 10 11:19:24]     -- Goto (international,6000,22)
[Oct 10 11:19:24]     -- Executing [6000 at international:22]
SpeechDeactivateGrammar("SIP/OB-0968d0f8", "yesno") in new stack
[Oct 10 11:19:24]     -- Executing [6000 at international:23]
SpeechUnloadGrammar("SIP/OB-0968d0f8", "yesno") in new stack
[Oct 10 11:19:24]     -- Executing [6000 at international:24]
SpeechDestroy("SIP/OB-0968d0f8", "") in new stack
[Oct 10 11:19:24]     -- Executing [6000 at international:25]
Hangup("SIP/OB-0968d0f8", "") in new stack

 
SRE_Log.txt:
 
10/10/2006
11:25:07,799,0,clsSpeechClientConnectionList::OpenConnections() is
creating clsSpeechClientConnection
10/10/2006 11:25:07,799,0,Created clsMQGrammar_Client_Handler.
10/10/2006 11:25:07,800,0,Opened clsMQGrammar_Client_Handler.
10/10/2006 11:25:14,387,13,clsSoundChannel::Decode1() Begin
10/10/2006 11:25:14,387,13,clsSoundChannel::SetupDecode() LangModel =
'AmericanEnglish'
10/10/2006 11:25:14,392,13,clsSoundChannel::Decode1::SendDecode()
10/10/2006 11:25:14,392,13,ERROR clsSoundChannel::Decode1::SendDecode()
Failed RetVal = -22

 
_____________________________________________________________ 
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/20061010/77620391/attachment.htm


More information about the asterisk-speech-rec mailing list