[asterisk-speech-rec] SpeechBackground Problem
Adam Robins
arobins at PharmaCentra.com
Thu Oct 12 08:28:03 MST 2006
Increasing the core debug and verbose to 999 shows nothing additional.
Looping back to SpeechStart instead of SpeechBackground does nothing.
But . . .
After the SpeechCreate, I added:
exten => 6000,n,SpeechProcessingSound(test-processing-sound)
Now, it works. Why, I have no idea.
I am also finding that the entire SR process is very unreliable. It
gets the correct response only 20-30% of the time. Often I can scream
into the phone and it says it received no sound at all.
If I can't get this to work 99.9% with a simple yes/no, I'm probably
going to abandon this for now.
-----Original Message-----
From: asterisk-speech-rec-bounces at lists.digium.com
[mailto:asterisk-speech-rec-bounces at lists.digium.com] On Behalf Of
Joshua Colp
Sent: Wednesday, October 11, 2006 6:24 PM
To: Discussing of speech recognition in Asterisk
Subject: Re: [asterisk-speech-rec] SpeechBackground Problem
Adam Robins wrote:
> 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
>
>
Have you tried going to SpeechStart instead of directly back to
SpeechBackground? Turned up debug to see if anything interesting
appears?
--
Joshua Colp
Software Developer
Digium, Inc.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec
More information about the asterisk-speech-rec
mailing list