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
Constants


Recognition Result Properties

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

IMPORTANT
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.
enum {
   kSRLanguageModelFormat              = 'lmfm',
   kSRPathFormat                       = 'lmpt',
   kSRPhraseFormat                     = 'lmph',
   kSRTEXTFormat                       = 'TEXT'
};
Constant descriptions

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. See "Interpreting Recognition Results," beginning on page 1-31 for information on parsing this language model.
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.
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.
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).

Previous Book Contents Book Index Next

© Apple Computer, Inc.
22 JAN 1997