Important: The information in this document is obsolete and should not be used for new development.
Setting the Language Model
To use a language model for recognition, you must attach it to a recognizer. You can attach a language model to a recognizer by calling theSRSetLanguageModelfunction, as shown in Listing 1-7.Listing 1-7 Setting the active language model
myErr = SRSetLanguageModel(gRecognizer, myTopLM);The recognizer maintains its own reference to the active language model, so you can (if you wish) release your reference to the active language model immediately after theSRSetLanguageModelcall. If you later need a reference to the active language model, you can call theSRGetLanguageModelfunction.