0

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?

Dave
  • 14,618
  • 13
  • 91
  • 145
  • I'm guessing you're referencing this article? http://msdn.microsoft.com/en-us/magazine/cc163663.aspx. It's quite old, and was based on a CTP/Beta. It looks like they later moved to just calling the method `Append` which is overloaded in what can be passed to it. – Damien_The_Unbeliever Feb 23 '11 at 08:55
  • @Damien_The_Unbeliever thanks, yes, that's the article I was referencing. I forgot to link to it, which I have now added. I didn't see a similar overload for `Append`, but I'll take a look again. Thanks! – Dave Feb 23 '11 at 14:15

0 Answers0