Carbon


SRAddText

Header: SpeechRecognition.h Carbon status: Supported

Adds text to the contents of a language object.

OSErr SRAddText (
    SRLanguageObject base, 
    const void *text, 
    Size textLength, 
    SInt32 refCon
);
Parameter descriptions
base

A language object to which to add the text.

text

A pointer to 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.

function result

A result code.

DISCUSSION

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.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/10/2000)