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


SRAddText

You can use the SRAddText function to add text to the contents of a language object.

pascal OSErr SRAddText (
SRLanguageObject base, 
const void *text, 
Size textLength, 
long refCon);
base
A language object.
text
The address of a buffer that contains the words or phrase to add to the contents of the specified language object.
textLength
The size, in bytes, of the specified text.
refCon
An application-defined reference constant. The value of the reference constant property of the new word or phrase representing the specified text is set to this value.
DESCRIPTION
The SRAddText function adds objects representing the text specified by the text and textLength parameters to the contents of the language object specified by the base parameter. In addition, the value of the reference constant property of the added objects is set to the value specified by the refCon parameter.

The SRAddText function is useful for phrases, paths, and language models. If the base parameter specifies a path or language model, SRAddText is equivalent to calling SRNewPhrase, SRAddLanguageObject, and SRReleaseObject for the phrase specified by the text parameter and calling SRSetProperty to reset the value of the reference constant property of the new phrase.

If the base parameter specifies a phrase, SRAddText is equivalent to calling SRNewPhrase, SRAddLanguageObject, and SRReleaseObject for each distinguishable word in the text parameter and calling SRSetProperty to set the value of the reference constant property of the new words.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
22 JAN 1997