Page 1 of 1

Valid Grammar, but Fails Inline

Posted: Wed Aug 29, 2007 5:22 am
by moshe
I've got a simple valid inline grammar in my voicexml script:

<grammar mode="voice">
<rule id="ready">ready</rule>
</grammar>

The page with this grammar passes validation with your VoiceXML validator; it passes your grammar validation tool; and works as expecte with your grammar teser. It also works correctly in another company's hosted service.

However, each time I try this grammar, I get an error.grammar.inlined.

The Last Call Log shows

<?xml version='1.0'?>
<grammar xml:lang="en-US" mode="voice">
<rule id="ready" scope="private">ready</rule>
</grammar>

and the pre-pended <?xml?> statement isn't loved by your grammar validator, which make me wonder what's going on.

Posted: Wed Aug 29, 2007 5:41 am
by moshe
And the answer is: you require explicit use of the "type" attribute on inline grammars; if I'm reading the VoiceXML spec 3.1.1.4 correctly, type is optional, but then again no type would make you have to guess at it.

The VoiceXML page validator doesn't pick this up.

Link for IVR grammars

Posted: Wed Aug 29, 2007 11:13 am
by support
Hi,

When you don't specify the type, it defaults to "application/x-jsgf". This explains why it didn't work for you when you tried:

Code: Select all

<grammar mode="voice">
<rule id="ready">ready</rule>
</grammar> 
For more information on our IVR grammars, you can go to this link:
http://www.plumvoice.com/docs/dev/devel ... ce:grammar

Also, the VoiceXML validator detects syntax errors, not IVR grammar errors. This is why the VoiceXML page validator didn't pick this up.

Regards,
Plum Support

Posted: Wed Aug 29, 2007 1:25 pm
by moshe
Thanks. I now see the "default" notation inside the JGSF section; I guess I managed to forget to keyword-search the documentation page.