I am attempting to make it so a user can say Modify X, followed by a number, and then have my software do something according to what the number is.
Currently, Modify X is listened out for; though I have no idea how to then detect the number said after the command.
I found that DictationGrammar has a SetDictationContext() method. However I don’t want it to detect any words, only numbers.
Any help would be appreciated. Thanks 🙂
You should probably start with http://msdn.microsoft.com/en-us/library/hh361633 and read about Grammars. You only use a dictation grammar when you want to recognize any possible words a user might say (think of a dictation grammar as being the complete dictionary). If you have a constrained set of words you want to recognize, use a task specific grammar. This can be created using a GrammarBuilder or similar methods.
There is a very good article that was published a few years ago at http://msdn.microsoft.com/en-us/magazine/cc163663.aspx. It is probably the best introductory article I’ve found so far. It is a little out of date, but very helfpul. (The AppendResultKeyValue method was dropped after the beta.)