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 / Speech Recognition Manager Reference
Speech Recognition Manager Routines / Manipulating Language Objects


SRChangeLanguageObject

You can use the SRChangeLanguageObject function to change the contents of a language object.

pascal OSErr SRChangeLanguageObject (
SRLanguageObject languageObject, 
const void *text, 
Size textLength);
languageObject
A language object.
text
The address of a buffer that contains the words or phrase to which the contents of the specified language object are to be changed.
textLength
The size, in bytes, of the specified text.
DESCRIPTION
The SRChangeLanguageObject function changes the contents of the language object specified by the languageObject parameter to the data specified by the text and textLength parameters. SRChangeLanguageObject is a convenient shortcut for calling SREmptyLanguageObject and then SRAddText.

SRChangeLanguageObject does not alter the value of the reference constant property of the language object specified by the lmObject parameter.

If there are no other references to the language object specified by the languageObject parameter, calling SRChangeLanguageObject causes that object to be released.

SPECIAL CONSIDERATIONS
If you want to swap rapidly among several language models, you should use the SRSetLanguageObject function instead of SRChangeLanguageObject. Or, you could use the kSREnabled property to rapidly enable and disable parts of the current language model to reflect the current context.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
22 JAN 1997