How to add words to an already loaded grammar using System.Speech and SAPI 5.3
- by Kim Major
Given the following code,
Choices choices = new Choices();
choices.Add(new GrammarBuilder(new SemanticResultValue("product", "<product/>")));
GrammarBuilder builder = new GrammarBuilder();
builder.Append(new SemanticResultKey("options", choices.ToGrammarBuilder()));
Grammar grammar = new Grammar(builder) { Name =…