how does the structure of an external vxml grammar looks like?
at the moment i have following inline grammar:
<grammar root="main" version="1.0" xml:lang="de-DE">
<rule id="main" scope="public">
<one-of>
<item> 1 </item>
<item> 2 </item>
<item>3 </item>
<item> 4</item>
</one-of>
</rule>
</grammar>
instead of this inline grammar i want to write
<grammar src = "mygrammar.grxml" type="application/srgs+xml" />
and refer to the external grammar.
can I just copy the inline grammar and put it in mygrammer.grxml?
or do I need somemore lines of code?
thanks in advance
----EDIT----
now where earlier my inline grammar was, i have
<grammar src = "grammar_produkte.grxml" type="application/srgs+xml" />
and my external grammar looks like this (like you said):
<?xml version="1.0" ?>
<grammar root="main" version="1.0" xml:lang="de-DE">
<rule id="main" scope="public">
<one-of>
<item> 1 </item>
<item> 2 </item>
<item> 3 </item>
<item> 4 </item>
</one-of>
</rule>
</grammar>
but it doesn't work. It says, that an error occurred and that the application stops. Did i do something wrong? The file is in the same directory like the .vxml.
I Use MS Speech Server 2007
----------------Edit-------
Hello,
I'm referencing to the grammar file with:
<grammar src = "grammar_produkte2.grxml" type="application/srgs+xml" />
In addition to the grammar i used before, now I use this example (from the website):
<?xml version="1.0"?>
<grammar xml:lang="de-DE"
tag-format="semantics-ms/1.0" version="1.0"
root="Root" mode="voice"
xmlns="http://www.w3.org/2001/06/grammar"
xmlns:sapi=
"http://schemas.microsoft.com/
Speech/2002/06/SRGSExtensions">
<rule id="produkte" scope="public">
<one-of>
<item>
<item>ham</item>
<tag>$._value = "ham"</tag>
</item>
<item>
<item>roast beef</item>
<tag>$._value = "roast beef"</tag>
</item>
<item>
<item>italian</item>
<tag>$._value = "italian"</tag>
</item>
</one-of>
</rule>
</grammar>
I tried it with mode=voice and dtmf.
Do I need anything else expect the speech server? The Files are in the same folder.