Carbon


SRAddLanguageObject

Header: SpeechRecognition.h Carbon status: Supported

Adds a language object to some other language object.

OSErr SRAddLanguageObject (
    SRLanguageObject base, 
    SRLanguageObject addon
);
Parameter descriptions
base

The language object to which to add the language object specified by the addon parameter.

addon

The language object to add on to the language object specified in the base parameter. For example, if addon specifies a word and base specifies a phrase, then SRAddLanguageObject appends that word to the end of that phrase.

function result

A result code.

DISCUSSION

The SRAddLanguageObject function is useful for adding language objects to phrases, paths, and language models. For a phrase or a path, SRAddLanguageObject appends the specified object to the end of the phrase or path. For a language model, SRAddLanguageObject adds the specified object to the list of alternative recognizable utterances.

The language object to which you add an object acquires a new reference to that object. Accordingly, any changes you subsequently make to the added object are reflected in any object to which you added it. The base object releases its reference to the added object when the base object is disposed of.

SRAddLanguageObject does not alter the value of the reference constant property of the language object specified by the base parameter.

See SRAddText for a useful shortcut function.

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)