Reputation: 1476
we would like to use an XML file for the grammar, to list all the commands for our system,
however, one of the commands will be "find user xxxxxx" where xxxxx will be a unique number.
If there a way within the grammar xml file to create this "wildcard / search item"
Upvotes: 2
Views: 1078
Reputation: 54
Try using a combination of two rules in your grxml file.
First rule to accept individual numbers:
<rule id="SmallNum" scope="public">
<one-of>
<item>One</item>
<item>Two</item>
<item>Three</item>
<item>Four</item>
<item>Five</item>
<item>Six</item>
<item>Seven</item>
<item>Eight</item>
<item>Nine</item>
<item>Zero</item>
</one-of>
</rule>
Second rule to build an account number from a specified number of numbers:
<rule id="AccountNumber" scope="public">
<item repeat="0-1">AccountNumber</item>
<item repeat="3">
<ruleref uri="#SmallNum"/>
</item>
</rule>
Upvotes: 3
Reputation: 2161
what you ask is possible... there are various ways to do this...
The better way would be writing some kind of intelligence using machine learning methodologies, but I suspect you don't want to go so far, so I suggest "teaching" number dictation and use SpeechHypothesized event (I comment this in the other post 'cause I suspected you would need it) to combine words.
Also good for you:
http://msdn.microsoft.com/en-us/library/ms873284.aspx (Build Knowledge)
and
Good luck
Upvotes: 0