[asterisk-speech-rec] SpeechBackground Problem
Joshua Colp
jcolp at digium.com
Wed Oct 11 15:23:53 MST 2006
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.
More information about the asterisk-speech-rec
mailing list