How to list the values in Speech.Recognition.Choices?
Posted on 2011-03-03
In my vb.net winforms voice enabled app, I want to display to the user a list of available commands. By available, I mean the commands the speech engine is supposed to recognize. In my app there will be a limited set of about 50 or so.
( I know what commands are SUPPOSED to be there because my code added them to a supposedly empty grammar. In addition to helping the user, actually querying the engine will validate that it contains what it is supposed to contain.)
How do I pull the current values from the Speech.Recognition.Choices?
In debug mode, this works to return the items one at a time (zero is an example element).
But the same code is not recognized by my winforms app when I try to add it. It will not compile because it says Oneof is not a member of Speech.Recognition.Choices and System.Speech.Internal.GrammarBuilding.GrammarBuilderPhrase is not defined.
(Windows XP, Speech SDK 5.1, Net Framework 4.)
Any help appreciated.
Thanks in advance.