Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Speech Recognition Manager /
Chapter 1 - Speech Recognition Manager / Using the Speech Recognition Manager


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 the SRSetLanguageModel function, 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 the SRSetLanguageModel call. If you later need a reference to the active language model, you can call the SRGetLanguageModel function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
22 JAN 1997