Hi all,
I seem to be having problems with a DTMF grammar definition, basically it is to accept dtmf input of 6 to 15 digits, using any digit from 0-9. However, MCP reports the error:
2012-06-27T18:40:12.759 Trc 40013 INFO 010800FE-1001EF81 1462426496 0C0003F5 Error starting DTMF Recognizer due to GRAMMAR_DEFINE_ERROR in grammar 0; throwing error back to interpreter
2012-06-27T18:40:12.760 Int 50025 010800FE-1001EF81 1460419456 input_end ERROR|||||
2012-06-27 18:40:12.760 DBUG 010800FE-1001EF81 1460419456 0C000000 InputItemRuntime.cxx:1588 HandleThrownEvent() Started for event [error.badfetch.grammar.syntax]
2012-06-27 18:40:12.760 DBUG 010800FE-1001EF81 1460419456 0C000000 InputItemRuntime.cxx:1594 Handling event [error.badfetch.grammar.syntax]
2012-06-27T18:40:12.760 Int 50034 010800FE-1001EF81 1460419456 event error.badfetch.grammar.syntax:1|DTMF grammar syntax error
The grammar file contains the following:
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN"
"http://www.w3.org/TR/speech-grammar/grammar.dtd">
<grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/06/grammar
http://www.w3.org/TR/speech-grammar/grammar.xsd"
version="1.0" mode="dtmf" tag-format="semantics/1.0" root="fixed">
<rule id="fixed">
<tag>out = "";</tag>
<one-of>
<item>
<item repeat="6-15">
<ruleref uri="#digit"/>
<tag>out += meta.latest().text;</tag>
</item>
</item>
</one-of>
</rule>
<rule id="digit">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>0</item>
</one-of>
</rule>
</grammar>
I have checked this with the W3C [url=http://www.w3.org/TR/semantic-interpretation/]http://www.w3.org/TR/semantic-interpretation/[/url] and cannot see any problems with the above. Can anyone see something wrong with the above?
Also, can anyone recommend any good quality reference books/tutorials for writing both DTMF/ASR GRXML grammars?
Thanks,
Lee