I'm starting to play around with the .NET speech recognition in System.Speech.Recognition
. I've been able to get some very basic phrases recognized, but in the event handler, I'd like to get at the certain pieces of information as shown in the pizza ordering example.
I could parse values from e.Result.Text using regex, but the pizza ordering example made use of a really handy method called AppendChoices
. The beauty of this method is that you essentially associate a list of possible words with a key, and when the event handler is called (after a phrase is recognized), you can access the value by looking at Semantics[<your key string here>]
. However, while Semantics is still available, I don't know how to make use of it since it seems that AppendChoices has been deprecated.
Is my only recourse to use regex in the event handler to figure out what the spoken command arguments were?