Posted: Tue Jun 10, 2008 9:39 pm Post subject: [asterisk-speech-rec] SpeechBackground + DTMF yielding stuck
Greetings. I am running Asterisk 1.4.20.1 with LumenVox & connector
(8.0) on a couple Linux distributions (mostly) successfully. However, I
have run into an issue where a speech variable is not being set correctly
after DTMF use, and I'm not sure if I'm doing something wrong. Consider
the following context (the 'answer' and the loading of the grammars are
done previously):
Here is the behavior when saying "three" during the first beep, and
ignoring the second two beeps. As expected, the latter two Noop's don't
provide any response:
-----
-- Executing [s@lumenvox-test:1]
SpeechCreate("SIP/SEND-t0906-08257800", "") in new stack
-- Executing [s@lumenvox-test:2]
SpeechActivateGrammar("SIP/SEND-t0906-08257800", "yesno") in new stack
-- Executing [s@lumenvox-test:3]
SpeechActivateGrammar("SIP/SEND-t0906-08257800", "digits") in new stack
-- Executing [s@lumenvox-test:4] Wait("SIP/SEND-t0906-08257800", "2")
in new stack
-- Executing [s@lumenvox-test:5]
SpeechBackground("SIP/SEND-t0906-08257800", "beep|3") in new stack
-- Executing [s@lumenvox-test:6] NoOp("SIP/SEND-t0906-08257800",
"999") in new stack
-- Executing [s@lumenvox-test:7] NoOp("SIP/SEND-t0906-08257800", "3")
in new stack
-- Executing [s@lumenvox-test:8]
SpeechBackground("SIP/SEND-t0906-08257800", "beep|3") in new stack
-- Executing [s@lumenvox-test:9] NoOp("SIP/SEND-t0906-08257800", "")
in new stack
-- Executing [s@lumenvox-test:10] NoOp("SIP/SEND-t0906-08257800", "")
in new stack
-- Executing [s@lumenvox-test:11]
SpeechBackground("SIP/SEND-t0906-08257800", "beep|3") in new stack
-- Executing [s@lumenvox-test:12] NoOp("SIP/SEND-t0906-08257800", "")
in new stack
-- Executing [s@lumenvox-test:13] NoOp("SIP/SEND-t0906-08257800", "")
in new stack
-- Executing [s@lumenvox-test:14]
SpeechDeactivateGrammar("SIP/SEND-t0906-08257800", "yesno") in new stack
-- Executing [s@lumenvox-test:15]
SpeechDeactivateGrammar("SIP/SEND-t0906-08257800", "digits") in new stack
-- Executing [s@lumenvox-test:16]
SpeechDestroy("SIP/SEND-t0906-08257800", "") in new stack
-----
Here is the same call when pressing 3 on the keypard during the first
beep, and ignoring the second two beeps:
-----
-- Executing [s@lumenvox-test:1]
SpeechCreate("SIP/SEND-t0906-a9b004a8", "") in new stack
-- Executing [s@lumenvox-test:2]
SpeechActivateGrammar("SIP/SEND-t0906-a9b004a8", "yesno") in new stack
-- Executing [s@lumenvox-test:3]
SpeechActivateGrammar("SIP/SEND-t0906-a9b004a8", "digits") in new stack
-- Executing [s@lumenvox-test:4] Wait("SIP/SEND-t0906-a9b004a8", "2")
in new stack
-- Executing [s@lumenvox-test:5]
SpeechBackground("SIP/SEND-t0906-a9b004a8", "beep|3") in new stack
-- Executing [s@lumenvox-test:6] NoOp("SIP/SEND-t0906-a9b004a8",
"1000") in new stack
-- Executing [s@lumenvox-test:7] NoOp("SIP/SEND-t0906-a9b004a8", "3")
in new stack
-- Executing [s@lumenvox-test:8]
SpeechBackground("SIP/SEND-t0906-a9b004a8", "beep|3") in new stack
-- Executing [s@lumenvox-test:9] NoOp("SIP/SEND-t0906-a9b004a8",
"1000") in new stack
-- Executing [s@lumenvox-test:10] NoOp("SIP/SEND-t0906-a9b004a8", "3")
in new stack
-- Executing [s@lumenvox-test:11]
SpeechBackground("SIP/SEND-t0906-a9b004a8", "beep|3") in new stack
-- Executing [s@lumenvox-test:12] NoOp("SIP/SEND-t0906-a9b004a8",
"1000") in new stack
-- Executing [s@lumenvox-test:13] NoOp("SIP/SEND-t0906-a9b004a8", "3")
in new stack
-- Executing [s@lumenvox-test:14]
SpeechDeactivateGrammar("SIP/SEND-t0906-a9b004a8", "yesno") in new stack
-- Executing [s@lumenvox-test:15]
SpeechDeactivateGrammar("SIP/SEND-t0906-a9b004a8", "digits") in new stack
-- Executing [s@lumenvox-test:16]
SpeechDestroy("SIP/SEND-t0906-a9b004a8", "") in new stack
-----
As you can see, the latter two SpeechBackground's don't return empty
values, but instead the original keypad input from the earlier use.
This causes a very messy fall-through situation unless you change those
variables immediately via a voice and SpeechBackground. Bug or am I doing
something wrong? Thanks.
Brian J. Conway
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Here you are storing the result score and text for each prompt to a new channel variable, after this you can run another speechbackground to get new scores and text's, just make sure to store them elsewhere before going for another speech interaction. This should point out to you how to store them, and probably give you the missing part where you see why you are rewriting the variables each time you get speech.
Trevor
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Tue Jun 10, 2008 11:04 pm Post subject: [asterisk-speech-rec] SpeechBackground + DTMF yielding stuck
On Tue, 10 Jun 2008 16:47:41 -0700 (PDT)
Trevor Benson <tbenson@a-1networks.com> wrote:
Quote:
Each time you create a 'SpeechBackground' you are resetting the
variables as you are grabbing speech again.
-snip-
Quote:
Here you are storing the result score and text for each prompt to a new
channel variable, after this you can run another speechbackground to
get new scores and text's, just make sure to store them elsewhere
before going for another speech interaction. This should point out to
you how to store them, and probably give you the missing part where you
see why you are rewriting the variables each time you get speech.
Thanks for the reply.
I understand that, and the variables being reset is what I'm expecting.
My point is that it's *not* happening when using DTMF. A
SpeechBackground that does not receive any speech is continuing to use
the result from the *previous* application call when DTMF is used (on the
first of three beeps in my previous example). Let me know if I wasn't
clear with my previous code snippet and sequence of events. Thanks.
Brian J. Conway
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
Posted: Thu Jun 12, 2008 4:44 pm Post subject: [asterisk-speech-rec] SpeechBackground + DTMF yielding stuck
Quote:
I understand that, and the variables being reset is what I'm expecting.
My point is that it's *not* happening when using DTMF. A
SpeechBackground that does not receive any speech is continuing to use
the result from the *previous* application call when DTMF is used (on
the
first of three beeps in my previous example). Let me know if I wasn't
clear with my previous code snippet and sequence of events. Thanks.
Yeah I misunderstood previously. I think that DTMF stores in another variable (${EXTEN}?) when doing that, I will have to dig into some of my speech/dtmf code and see what I was doing to handle it when they started using keypress instead.
Quote:
Brian J. Conway
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum