This is a VXML page using a DTMF and a voice grammar in parallel:
<vxml xmlns="http://www.w3.org/2001/vxml" version="2.1">
</vxml>
<form id="user-content-InputRequestForm" scope="document">
<field name="A_repeat">
<property name="bargein" value="true">
<property name="timeout" value="3s">
<property name="confidencelevel" value="0.5">
<property name="sensitivity" value="0.5">
<property name="speedvsaccuracy" value="0.5">
<property name="completetimeout" value="3s">
<property name="incompletetimeout" value="3s">
<property name="maxspeechtimeout" value="10s">
<property name="inputmodes" value="voice">
<property name="com.telera.speechenabled" value="true">
<prompt bargein="true" xml:lang="en-US">Would you like me to repeat the code? </prompt>
<grammar mode="dtmf" type="application/x-jsgf" src="/RandomCodeGen/-/resources/InterviewVoice/Default/generic.jsgf">
<grammar mode="voice" type="application/x-jsgf" src="/RandomCodeGen/-/resources/InterviewVoice/Default/yesno.jsgf">
<filled>
<if cond="typeof(application.lastresult$.markname) == 'string'">
<script> lastresult = lastresult + '<mark name="' + application.lastresult$.markname + '" offset="' + application.lastresult$.marktime + '"/>';<br>
for(var i = 0; i < application.lastresult$.length; i++)<br>
{<br>
lastresult = lastresult + '<result>';<br>
lastresult = lastresult + '<confidence>' + application.lastresult$<span>[i]</span>.confidence + '</confidence>';<br>
lastresult = lastresult + '<utterance><![CDATA<span>[' + application.lastresult$[i]</span>.utterance + ']]></utterance>';<br>
lastresult = lastresult + '<inputmode><![CDATA<span>[' + application.lastresult$[i]</span>.inputmode + ']]></inputmode>';<br>
lastresult = lastresult + '<interpretation><![CDATA<span>[' + application.lastresult$[i]</span>.interpretation + ']]></interpretation>';<br>
lastresult = lastresult + '</result>';<br>
}<br>
lastresult = lastresult + '</lastresult>';<br>
</script>
<else>
<script> lastresult = lastresult + '<mark name="NONE" offset="0"/>';<br>
for(var i = 0; i < application.lastresult$.length; i++)<br>
{<br>
lastresult = lastresult + '<result>';<br>
lastresult = lastresult + '<confidence>' + application.lastresult$<span>[i]</span>.confidence + '</confidence>';<br>
lastresult = lastresult + '<utterance><![CDATA<span>[' + application.lastresult$[i]</span>.utterance + ']]></utterance>';<br>
lastresult = lastresult + '<inputmode><![CDATA<span>[' + application.lastresult$[i]</span>.inputmode + ']]></inputmode>';<br>
lastresult = lastresult + '<interpretation><![CDATA<span>[' + application.lastresult$[i]</span>.interpretation + ']]></interpretation>';<br>
lastresult = lastresult + '</result>';<br>
}<br>
lastresult = lastresult + '</lastresult>';<br>
</script>
</else></if>
<submit next="/RandomCodeGen/-/next?Action_b2614822a1574fe0a052db80b007525c=success.filled" method="post" namelist="A_repeat lastresult">
</submit></filled>
<noinput>
<submit next="/RandomCodeGen/-/next?Action_b2614822a1574fe0a052db80b007525c=error.input.noinput" method="get" namelist="A_repeat">
</submit></noinput>
<nomatch>
<if cond="typeof(application.lastresult$.markname) == 'string'">
<script> lastresult = lastresult + '<mark name="' + application.lastresult$.markname + '" offset="' + application.lastresult$.marktime + '"/>';<br>
for(var i = 0; i < application.lastresult$.length; i++)<br>
{<br>
lastresult = lastresult + '<result>';<br>
lastresult = lastresult + '<confidence>' + application.lastresult$<span>[i]</span>.confidence + '</confidence>';<br>
lastresult = lastresult + '<utterance><![CDATA<span>[' + application.lastresult$[i]</span>.utterance + ']]></utterance>';<br>
lastresult = lastresult + '<inputmode><![CDATA<span>[' + application.lastresult$[i]</span>.inputmode + ']]></inputmode>';<br>
lastresult = lastresult + '<interpretation><![CDATA<span>[' + application.lastresult$[i]</span>.interpretation + ']]></interpretation>';<br>
lastresult = lastresult + '</result>';<br>
}<br>
lastresult = lastresult + '</lastresult>';<br>
</script>
<else>
<script> lastresult = lastresult + '<mark name="NONE" offset="0"/>';<br>
for(var i = 0; i < application.lastresult$.length; i++)<br>
{<br>
lastresult = lastresult + '<result>';<br>
lastresult = lastresult + '<confidence>' + application.lastresult$<span>[i]</span>.confidence + '</confidence>';<br>
lastresult = lastresult + '<utterance><![CDATA<span>[' + application.lastresult$[i]</span>.utterance + ']]></utterance>';<br>
lastresult = lastresult + '<inputmode><![CDATA<span>[' + application.lastresult$[i]</span>.inputmode + ']]></inputmode>';<br>
lastresult = lastresult + '<interpretation><![CDATA<span>[' + application.lastresult$[i]</span>.interpretation + ']]></interpretation>';<br>
lastresult = lastresult + '</result>';<br>
}<br>
lastresult = lastresult + '</lastresult>';<br>
</script>
</else></if>
<submit next="/RandomCodeGen/-/next?Action_b2614822a1574fe0a052db80b007525c=error.input.nomatch" method="post" namelist="A_repeat lastresult">
</submit></nomatch>
<catch event="connection.disconnect.hangup">
<goto next="/RandomCodeGen/-/next?Action_b2614822a1574fe0a052db80b007525c=error.disconnect.hangup">
</goto></catch>
</grammar></grammar></property></property></property></property></property></property></property></property></property></property></field>
<catch event="externalmessage.cpa.machine">
<goto next="/RandomCodeGen/-/next?Action_b2614822a1574fe0a052db80b007525c=externalmessage.cpa.machine">
</goto></catch>
<catch event="externalmessage.cpa.beep">
<goto next="/RandomCodeGen/-/next?Action_b2614822a1574fe0a052db80b007525c=externalmessage.cpa.beep">
</goto></catch>
<catch event="externalmessage.cpa.machine">
<goto next="/RandomCodeGen/-/next?Action_b2614822a1574fe0a052db80b007525c=externalmessage.cpa.machine">
</goto></catch>
</form>
<catch event="connection.disconnect.hangup">
<goto next="/RandomCodeGen/-/abort">
</goto></catch>
It turns out that both of the grammars are interpreted by Halef to be voice grammars as evidenced by the following JVXML log:
with id 'org.jvoicexml.SpeechRecognizerProperties'
[java] 2015-06-12 02:17:04,571 DEBUG ~.~.~.~.~.DefaultListableBeanFactory [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: Returning cached instance of singleton bean 'org.jvoicexml.SpeechRecognizerProperties'
[java] 2015-06-12 02:17:04,578 DEBUG ~.~.~.JVoiceXmlConfiguration [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: loading bean with id 'org.jvoicexml.DtmfRecognizerProperties'
[java] 2015-06-12 02:17:04,584 DEBUG ~.~.~.~.~.DefaultListableBeanFactory [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: Returning cached instance of singleton bean 'org.jvoicexml.DtmfRecognizerProperties'
[java] 2015-06-12 02:17:04,590 DEBUG ~.~.~.~.Mrcpv2SpokenInput [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: starting recognition...
[java] 2015-06-12 02:17:04,596 INFO ~.~.~.~.Mrcpv2SpokenInput [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: speechClient.recognize is executed
[java] 2015-06-12 02:17:04,602 INFO ~.~.~.~.Mrcpv2SpokenInput [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: Starting recognition with url: http://141.31.8.128:8080/RandomCodeGen/-/resources/InterviewVoice/Default/generic.jsgf
[java] grammar type is 601143515742482: application/x-jsgf
[java] grammar src is 601143515742482: /RandomCodeGen/-/resources/InterviewVoice/Default/yesno.jsgf
[java] grammar ext is 601143515742482: sno.jsgf
[java] 2015-06-12 02:17:04,609 INFO ~.~.~.~.Mrcpv2SpokenInput [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: Grammar type: application/x-jsgf
[java] grammar type is 601143515742482: application/x-jsgf
[java] grammar src is 601143515742482: /RandomCodeGen/-/resources/InterviewVoice/Default/yesno.jsgf
[java] grammar ext is 601143515742482: sno.jsgf
[java] 2015-06-12 02:17:04,615 DEBUG ~.~.~.~.SpeechClientImpl [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: The grammar text: http://141.31.8.128:8080/RandomCodeGen/-/resources/InterviewVoice/Default/generic.jsgf
[java]
[java] 2015-06-12 02:17:05,667 DEBUG ~.~.~.~.SpeechClientImpl [47b898ac-b63b-4fbe-bf6f-b3b95269f512]: MRCP response received:
[java] MRCP/2.0 89 1434068205917 200 IN-PROGRESS
[java] Channel-Identifier:14de4fd2bad@speechrecog
and the respective Cairo log:
2015-06-12 03:32:51,085 DEBUG ~.~.~.~.~.RTPStreamReplicator [Thread-316]: Done Creating realized processor...
2015-06-12 03:32:51,090 DEBUG ~.~.~.~.~.RTPStreamReplicator [Thread-316]: Processor realized.
2015-06-12 03:32:51,094 DEBUG ~.~.~.~.~.RTPRecogChannel [Thread-316]: OK, created new realized processor
2015-06-12 03:32:51,099 DEBUG ~.~.~.~.~.RTPRecogChannel [Thread-316]: OK, created new datasource com.sun.media.multiplexer.RawBufferMux$RawBufferDataSource@77fc3ca1
2015-06-12 03:32:51,104 DEBUG ~.~.~.~.~.RTPRecogChannel [Thread-316]: Borrowing recognition engine from object pool...
2015-06-12 03:32:51,109 DEBUG ~.~.~.~.~.~.SphinxRecEngine [Thread-316]: SphinxRecEngine #2 activating...
2015-06-12 03:32:51,114 DEBUG ~.~.~.~.~.RecogInterface [Thread-316]: Loading grammar...
2015-06-12 03:32:51,119 DEBUG ~.~.~.~.~.~.SphinxRecEngine [Thread-316]: loadJSGF file: generic.ttp://141.31.8.128:8080/RandomCodeGen/-/resources/InterviewVoice/Default/generic.jsgf
03:32:51.789 INFO grammar Num nodes : 70
03:32:51.790 INFO grammar Num arcs : 81
03:32:51.790 INFO grammar Avg arcs : 1.1571429
2015-06-12 03:32:51,790 DEBUG ~.~.~.~.~.~.SphinxRecEngine [Thread-316]: load (JSGF file): completed successfully.
2015-06-12 03:32:51,798 DEBUG ~.~.~.~.~.RTPRecogChannel [Thread-316]: Recognize command with a listener: org.speechforge.cairo.server.recog.MrcpRecogChannel$Listener@6aa1be04
2015-06-12 03:32:51,803 DEBUG ~.~.~.~.~.RTPRecogChannel [Thread-316]: Starting recognition...
2015-06-12 03:32:51,808 DEBUG ~.~.~.~.~.~.SphinxRecEngine [Thread-316]: SphinxRecEngine #2 (Clone of #2) starting recognition...
2015-06-12 03:32:51,808 DEBUG ~.~.~.~.ProcessorStarter [JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler]: controllerUpdate(): ControllerEvent received: javax.media.TransitionEvent[source=com.sun.media.processor.unknown.Handler@30157c98,previous=Realized,current=Prefetching,target=Started]
Hi David,
Thanks for discussing this issue with me during today's meeting. For the record, it was due to the fact that the DTMF Grammar was set to dummy.wfst for the other dialog states. This was only visible when the User Input Style was switched to Hybrid instead of Voice Only.
I have fixed this for all of the dialog states and redeployed 7714.war. I just tested it out, and it was impressionistically faster. JFYI, I noticed some distortion / choppy audio at the beginning of the playback of the system's audio files, similar to what we had encountered previously. It wasn't as bad as it was before, but it was noticeable.
Thanks,
Keelan