We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Inline Grammar Error

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Inline Grammar Error

Post by shanthint@paydq.com »

Hello,

I am having a problem with inline grammar.

here is the code.
The array and all variables are declared and assigned properly.

<form id="main">
<var name="count" expr="1"/>
<grammar type="text/gsl">
[one two three four five six seven eight nine zero]
</grammar>
<grammar type="text/gsl">
[dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0]
</grammar>

<field name="choice" type="digits?length=1">
<prompt>
<foreach array="menuArray" item="menuObj">
<prompt><voice gender="female" name="linda">
<value expr="menuObj.item" />, Press or Say <value expr="count++"/>. <!-- or Say <value expr="count-1"/>. -->
</voice></prompt>
</foreach>

</prompt>

<filled>

<if cond="choice > menuArray.length">
<clear />
<reprompt/>
<else/>
<assign name="dest" expr="menuArray[choice-1].dest"/>
<goto expr="dest" />
</if>
</filled>
</field>
</form>

I am using the same code in the plum voice developer's site. It was working very well. But when I deploy the same application in our IVR Plum voice server It is giving this error

<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="voice">
[one two three four five six seven eight nine zero]
</grammar>

---------

bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS text/plain;charset=wchar_t for:
---------

A serious error of type
---------


Mon 04 Jun 2007 02:11:28 PM EDT:

bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS text/plain;charset=wchar_t for:
---------
error.grammar.inlined
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS text/plain;charset=wchar_t for:
---------
has occurred. Exiting.
---------



I hope I give enough information. Please let me know if you need more info.

Thank you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR platform supports JSGF and SRGS grammars

Post by support »

Hi,

Our IVR systems have never supported gsl grammars at any point. We require that you convert these IVR grammars to ABNF or JSGF format.

Regards,
Plum Support
Last edited by support on Sat Feb 20, 2010 2:37 pm, edited 3 times in total.

shanthint@paydq.com
Posts: 84
Joined: Wed Apr 04, 2007 4:58 pm

Post by shanthint@paydq.com »

Hello,

We are experiencing Grammar problem. I am very new with the Grammar things.

Problem 1. Our Plum IVR Server is not able load builtin grammars.

Example code snippet :

<field name="myfield" type="builtin:grammar/digits">
<prompt> Please enter something </prompt>
<filled>
You entered <value expr="myfield"/>.
</filled>
<nomatch>
You did not say or enter any ones or twos.
<reprompt/>
</nomatch>
<noinput>
You did not enter anything.
<reprompt/>
</noinput>
</field>

OR

<field name="myfield" type = "digits?length=1">
<prompt> Please enter something </prompt>
<filled>
You entered <value expr="myfield"/>.
</filled>
<nomatch>
You did not say or enter any ones or twos.
<reprompt/>
</nomatch>
<noinput>
You did not enter anything.
<reprompt/>
</noinput>
</field>

It was working fine in plum voice developer site.
But our server is throwing Error Loading builtin grammar.

Problem 2: Even the code in the Programmer's manual is not working .

Code:

<?xml version="1.0"?>
<vxml version="2.0">
<form>
<field name="myfield">
<grammar type="application/x-jsgf" mode="dtmf">
( 1 | 2 )+
</grammar>
<grammar type="application/srgs+xml" mode="voice">
( one | two )+
</grammar>
<prompt>
Say or enter any number of the digits one or two.
</prompt>
<filled>
You entered <value expr="myfield"/>.
</filled>
</field>
</form>
</vxml>


Problem 3 : JSGF inline grammar is also not working.
This code throws Serious error of type error.grammar.inlined.

code :
<field name="myfield" >

<grammar>
<![CDATA[
#JSGF 1.0;
grammar myfield;
public <myfield> = (1|2);
]]>
</grammar>
<prompt> Please enter digits one or two </prompt>
<filled>
You entered <value expr="myfield"/>.
</filled>
</field>

I think i provide enough information.

any help would be appreciated.

Thank you

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR grammar issue

Post by support »

Hi,

<field name="myfield" type="builtin:grammar/digits"> will not work anywhere in our IVR platform. The "builtin:grammar/digits" syntax is only used with the <grammar> tag, e.g.

<grammar src="builtin:grammar/digits" />


<field name="myfield" type = "digits?length=1"> should work with no problems.


<grammar type="application/srgs+xml" mode="voice"> will not work. Use <grammar type="application/x-jsgf" mode="voice"> instead.


JSGF inline grammars require a particular syntax for the version number:

#JSGF V1.0; (your version lacked the "V")


Regards,
Plum Support

Post Reply