How to derive a class from StaticGrammarBase

30Jan

The class StaticGrammarBase is the base class which loads W3C Grxml file to memory for speech recognitions. The base class provides several virtual functions which should be overridden in the derived class. Here are the typical procedures or guidelines recommended:

Derive a class from StaticGrammarBase:

classVerbNounGrammar : StaticGrammarBase {

}

Define a constructor which calls the base class’s constructor:

publicVerbNounGrammar(strings, HostInfohost) : base(s,host)

{

}

Override the function OnSpeechRecognized to dig out the recognition results: