Carbon


Recognition Result Properties

Header: SpeechRecognition.h

enum {
    kSRTEXTFormat = 'TEXT',
    kSRPhraseFormat = 'lmph',
    kSRPathFormat = 'lmpt',
    kSRLanguageModelFormat = 'lmfm'
};

Constant descriptions

kSRTEXTFormat

The text format. The value of this property is a variable-length string of characters that is the text of the recognized utterance. If the utterance was rejected, this text is the spelling of the rejected word. The string value does not include either a length byte (as in Pascal strings) or a null terminating character (as in C strings).

kSRPhraseFormat

The phrase format. The value of this property is a phrase that contains one word (of type SRWord) for each word in the recognized utterance. If the utterance was rejected, this path or phrase contains one object, the rejected word. The reference constant value of the phrase is always 0, but each word in the phrase retains its own reference constant property value.

kSRPathFormat

The path format. The value of this property is a path that contains a sequence of words (of type SRWord) and phrases (of type SRPhrase) representing the text of the recognized utterance. If the utterance was rejected, this path or phrase contains one object, the rejected word. The reference constant value of the path is always 0, but each word or phrase in the path retains its own reference constant property value.

kSRLanguageModelFormat

The language model format. The value of this property is a language model that contains a copy of each word, phrase, path, and language model used in the recognized utterance. If the utterance was rejected, the value of this property is the rejected word (that is, the kSRRejectedWord property of the recognition system). The name and reference constant of this language model are the same as the name and reference constant of the active language model, and each subitem in the language model retains its own reference constant property value.

Every recognition result object has a set of properties that you can inspect by calling the SRGetProperty function. You specify a property by passing a property selector to those functions. The Speech Recognition Manager defines these property selectors for recognition results.

SRGetProperty returns an object reference as the value of a recognition result’s kSRPhraseFormat, kSRPathFormat, or kSRLanguageModelFormat property. You must make sure to release that object reference (by calling SRReleaseObject) when you are finished using it.


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