Page 1 of 1

XML grammar and DTMF

Posted: Sat Oct 02, 2010 5:50 pm
by sniemetz
Hello,

I am trying to run this grammar but get an "error.grammar.inlined" error;

what I am trying to do is this:

I have a word-based grammar and want to add a digit-based grammar.

I want to be able to get a match using either a word, or a series of digits. I then need to extract the semantic result for further processing.

Works fine with word based. DTMF is failing:

<grammar type="application/srgs+xml" maxage="300" mode="dtmf">
<rule id="ROOT2">
<one-of>
<item>11<tag>foo="bar";</tag>
</item>
</rule>
</grammar>

Re: XML grammar and DTMF

Posted: Mon Oct 04, 2010 9:02 am
by support
Hi,

From taking a look at your code, we've noticed a couple things with your grammar. First, you are missing a closing </one-of> tag, also, keep in mind that when using SRGS+XML grammars, you must include a root attribute. The modified code would look like this:

Code: Select all

<grammar type="application/srgs+xml" maxage="300" root="ROOT2" mode="dtmf"> 
<rule id="ROOT2"> 
<one-of> 
<item>11<tag>foo="bar";</tag> 
</item> 
</one-of>
</rule> 
</grammar>
For more information on grammars, you can also check out our help docs.

Hope this helps.

Regards,
Plum Support

Re: XML grammar and DTMF

Posted: Sun Oct 17, 2010 12:33 am
by sniemetz
weird.

thought I'd set the root attribute/nodes -- must have had a typo b/c when I retested - all worked great. thanks!