Page 1 of 1
Problem with External Grammar File
Posted: Tue Jan 03, 2006 6:26 pm
by sureshkuyilath
I have been experimenting with different grammar formats. We have the platform version 2.5.0.12, with the Sphinx ASR. I could not get this external grammar file working. The platform reports grammar error.
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<grammar mode="dtmf" type="application/srgs+xml" root="nbr" xml:lang="en-US" version="1.0" >
<rule id="nbr" scope="public">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>"*"</item>
<item>"#"</item>
</one-of>
</rule>
</grammar>
The same grammar segment works perfectly if I declare inline. Please advice what I am doing wrong?
provide IVR grammar in local reference
Posted: Wed Jan 04, 2006 11:39 am
by support
Hello,
You should be providing the IVR tag,
<grammar>, (and it's data) in the local reference rather than in the remote IVR grammar. An example VXML file would look like:
Code: Select all
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<field name="field1">
<prompt>Please press a digit</prompt>
<grammar src="remotegrammar.grxml" mode="dtmf" type="application/srgs+xml" root="nbr" xml:lang="en-US" version="1.0"/>
</field>
</form>
</vxml>
And your remote IVR grammar would look like:
Code: Select all
<rule id="nbr" scope="public">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>"*"</item>
<item>"#"</item>
</one-of>
</rule>
Hope this helps.
Regards,
Plum Support
Posted: Wed Jan 04, 2006 2:06 pm
by sureshkuyilath
Thanks. That worked. But, I am still confused.
Is that true according to the SRGS spec? The way I understood, the external grammar file must be a well formed XML document with elements from the namespace "
http://www.w3.org/2001/06/grammar" version="1.0".
The spec also gives examples such grammars. Why is this different here? Is this an implementation limitation ?
Thanks,
Suresh
grammar limitation of current IVR platform
Posted: Wed Jan 04, 2006 4:14 pm
by support
Hello,
Yes, this is currently a limitation of the Plum IVR Platform. We require that the local grammar reference contain the information about the IVR grammar load and that the external IVR grammar provide the data within that
<grammar> tag. We are working towards complete standardization and do plan to support the standard format as well for external IVR grammars in the future.
Regards,
Plum Support
Posted: Wed Jan 04, 2006 5:01 pm
by sureshkuyilath
Thanks and glad to know that this will be available in the future. Lack of this will restrict portability, and also prevent the usage of third party grammars.
Regards,
Suresh