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


Language Object Properties

Every language object (that is, any instance of a subclass of the SRLanguageObject class) has a set of properties that you can inspect and change by calling the SRGetProperty and SRSetProperty routines. You specify a property by passing a property selector to those functions. The Speech Recognition Manager defines these property selectors for language objects:

enum {
   kSRSpelling                         = 'spel',
   kSRLMObjType                        = 'lmtp',
   kSRRefCon                           = 'refc',
   kSROptional                         = 'optl',
   kSREnabled                          = 'enbl',
   kSRRepeatable                       = 'rptb',
   kSRRejectable                       = 'rjbl',
   kSRRejectionLevel                   = 'rjct'
};
Constant descriptions

kSRSpelling
The spelling of a language object. The value of this property is a variable-length string of characters. For an object of type SRWord, the value is the spelled word. For an object of type SRPhrase, the value is the concatenation of the spellings of each word in the phrase, separated by a language-dependent separation character (for example, by a space character). For an object of type SRPath, the value is the concatenation of the spellings of each word and language model name in the path. For an object of type SRLanguageModel, the value is the name of the language model. For any object, the string value does not include either a length byte (as in Pascal strings) or a null terminating character (as in C strings).
kSRLMObjType
The type of a language object. The value of this property is a four-character constant of type OSType; see the section "Language Object Types" on page 1-49 for the values that are defined for this property. You cannot set a property of this type.
kSRRefCon
The reference constant. The value of this property is a 4-byte value specified by your application. By default, the value of a reference constant property is zero (0).
kSROptional
The optional flag. The value of this property is a Boolean value that indicates whether speaking the words, phrases, paths, and language models represented by the object is optional (TRUE) or required (FALSE). A user is not required to utter optional words, phrases, or language models. By default, the value of an object's optional flag is FALSE.
kSREnabled
The enabled flag. The value of this property is a Boolean value that indicates whether the object is enabled (TRUE) or disabled (FALSE). Disabled objects are ignored during speech recognition. By default, the value of an object's enabled flag is TRUE.
kSRRepeatable
The repeatable flag. The value of this property is a Boolean value that indicates whether the object is repeatable (TRUE) or not (FALSE). A user can utter a repeatable object more than once. By default, the value of an object's repeatable flag is FALSE.
kSRRejectable
The rejectable flag. The value of this property is a Boolean value that indicates whether the object is rejectable (TRUE) or not (FALSE). An object is rejectable if a recognition system can return the rejected word instead of that object. (The rejected word is the value of the kSRRejectedWord property of the recognition system.) By default, the value of an object's rejectable flag is FALSE. However, if an entire utterance is rejected, you can still get the rejected word. See "Recognition Result Properties" on page 1-46.
kSRRejectionLevel
The rejection level. The value of this property is a 2-byte unsigned integer of type SRRejectionLevel between 0 and 100, inclusive, that determines how likely a recognizer is to reject a language object whose kSRRejectable property is TRUE. If an object's rejection level is close to 0, the recognizer is less likely to reject utterances (and hence more likely to return a result with phrases from the current language model, whether or not the user actually said something in that language model); if an object's rejection level is close to 100, the recognizer is more likely to reject utterances. You can set an object's rejection flag to TRUE and its rejection level to some appropriate value to reduce the likelihood that a recognizer will mistakenly recognize a random user utterance as part of the active language model. By default, the value of an object's rejection level is 50.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
22 JAN 1997