Page 1 of 1

Grammar issue

Posted: Wed Jun 18, 2008 4:07 pm
by shanthint@paydq.com
Hello,
I am experiencing some problem with dtmf and voice input.
I need to have both inputs in the same field. but I am getting error.recognintion.nogrammar error.
code snippet is here.


<var name="custname" expr="'0'" />
<form id="getName">
<field name="name" >
<prompt bargein="false">
To confirm this payment
Please say your name.
To cancel the payment, Press 2
</prompt>
</field>

<filled>
<if cond="name$.inputmode=='voice'">
<assign name="custname" expr="name"/>
<goto next="#confName"/>

<else/>
<goto next="#getName"/>
</if>
</filled>

</form>


<form id="confName">

<field name="enter" type="boolean" >

<prompt>
<sentence>You entered <value expr="custname"/>.</sentence>
<sentence>If this is correct, Press 1.</sentence> Press 2 to enter the name again.

</prompt>

<filled>
<if cond="enter==false">
<clear namelist="custname" />
<goto next="#getName"/>
<else/>
<prompt>Success</prompt>
</if>
</filled>
</field>

</form>

What am I doing wrong here?
any help would be appreciated.
Thanks in advance.

Adjust IVR code by specifying a grammar within field

Posted: Wed Jun 18, 2008 5:18 pm
by support
Hi,

The reason why you are getting this IVR issue is because you need to specify an IVR grammar within your field.

You can try using the following IVR example to help you adjust your IVR code:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<var name="custname" expr="'0'"/>
<form id="getName">
<field name="name">
  <grammar src="http://vxml.plumgroup.com/grammars/firstname.php" root="ROOT" type="application/srgs+xml" mode="voice"/>
  <grammar type="application/srgs+xml" root="ROOT" mode="dtmf">
    <rule id="ROOT">
      <one-of>
        <item>2</item>
      </one-of>
    </rule>
  </grammar>
  <prompt bargein="false">
    To confirm this payment, please say your first name and spell it. To cancel the payment, Press 2.
  </prompt>
  <filled>
    <if cond="name$.inputmode=='voice'">
      <assign name="custname" expr="name"/>
      <goto next="#confName"/>
    <else/>
      <goto next="#getName"/>
    </if>
  </filled>
</field>
</form>


<form id="confName">

<field name="enter" type="boolean" >

<prompt>
<sentence>You entered <value expr="custname"/>.</sentence>
<sentence>If this is correct, Press 1.</sentence> Press 2 to enter the name again.

</prompt>

<filled>
<if cond="enter==false">
<clear namelist="custname" />
<goto next="#getName"/>
<else/>
<prompt>Success</prompt>
</if>
</filled>
</field>

</form>
</vxml>
Hope this helps.

Regards,
Plum Support

Posted: Thu Jun 19, 2008 10:36 am
by shanthint@paydq.com
Hi,
I tried the code you suggested. Our TTS engine can not recognize the voice input. It gives me the error 'Sorry, I didn't understand you.'
The press 2 works fine.
I am just wondering that whether it can the grammar from the URL you gave or not.

Thanks.

IVR grammar fix

Posted: Thu Jun 19, 2008 12:33 pm
by support
Hi,

We tried testing the IVR grammar with the input, "John" and it worked fine for us.

You could try adjusting the sensitivity to a lower value to account for any background noise that might be causing the <nomatch>:

Code: Select all

<property name="sensitivity" value="0.3"/>
Hope this change in IVR code helps.

Regards,
Plum Support