Carbon


SRNewPhrase

Header: SpeechRecognition.h Carbon status: Supported

Creates a new phrase.

OSErr SRNewPhrase (
    SRRecognitionSystem system, 
    SRPhrase *phrase, 
    const void *text, 
    Size textLength
);
Parameter descriptions
system

A recognition system.

phrase

On return, a reference to a new phrase associated with the specified recognition system.

text

A pointer to a buffer that contains the words that comprise the phrase.

textLength

The size, in bytes, of the specified text.

function result

A result code.

DISCUSSION

The phrase’s contents (that is, the words that comprise the phrase) is specified by the text and textLength parameters. You can, if you wish, create a new empty phrase and then add words to it by calling the SRAddText or SRAddLanguageObject functions.

You should call the SRReleaseObject function to release the phrase reference returned by SRNewPhrase when you are done using it.

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)