- Home /
Use Dictation in srgs xml
Hi. I am using GrammarRecognizer, to load an XML file containing the srgs grammar. To be able to get variable Input like e.g. Names, I want to use dictation. When using System.Speech.Recognition.SrgsGrammar to create the XML file, SrgsRuleRef.Dictation seems to do that, but the result is not working. My test file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<grammar xml:lang="de-DE"
root="root"
tag-format="properties-ms/1.0"
version="1.0"
xmlns="http://www.w3.org/2001/06/grammar">
<rule id="dictationtest"
scope="public">
<item>hello, my name is</item>
<item repeat="0-3">
<ruleref uri="grammar:dictation" />
<tag>dictation="name"</tag>
</item>
</rule>
<rule id="root">
<one-of>
<item>Hello</item>
<item>
<ruleref uri="#dictationtest" />
</item>
</one-of>
</rule>
</grammar>
It is working, when I use text like "Sam" instead of ">ruleref uri="grammar:dictation" type="application/srgs+xml"/<". I also read about variations of this tag like >ruleref uri="grammar:dictation" type="application/srgs+xml"/< or in a more general way >DICTATION PROPID="PID_FirstName"/< Note that I changed > and <, so that it won't be seen as HTML tags. Maybe you also know something else, I could use. Thanks for your help and advise.
Your answer
Follow this Question
Related Questions
DictationRecognizer always fails with UnknownError 10 Answers
UnityException: Speech recognition is not supported on this machine. Windows 10 Home 0 Answers
XmlDocument will not build. Works perfectly in editor. 0 Answers
Windows speak recognition only partially working, is there a limit set to the number of phrases? 0 Answers
DictationRecognizer never calls DictationResult or DictationHypothesis deligates 0 Answers