//build the core set of choices Choices sizes = new Choices("small", "regular", "large"); //Intialize Grammer builder object GrammarBuilder myBuilder = new GrammarBuilder(); myBuilder.AppendChoices(sizes, "size");
I found that in .net 3.5 ( which is the version I use with VS 2008 ) there is no such funtion calle AppendChoices in the GrammerBuilder class. instead it has the Append method. But it doesnt take two arguments as in the example ( the choice object and a key value ).
what i need to do is to tag the specific choice as in the code. This really helps to get the recognized / semantic values in the speech_recognized event in the grammer class . heres how it is used in the code.
StringBuilder sb = new StringBuilder(); sb.AppendLine(e.Result.Semantics["size"].Value.ToString());
Could you please let me know how to archive this in .net 3.5 . I really think the tagging is very efficent when it comes to identifying the keywords recognized. otherwise I'll have to check the whole recognized phrase for the desired keyword. which is bad for a long phrase.