![]() |
Recognizer Listen Key Properties |
Header: SpeechRecognition.h |
enum { kSRListenKeyMode = 'lkmd', kSRListenKeyCombo = 'lkey', kSRListenKeyName = 'lnam', kSRKeyWord = 'kwrd', kSRKeyExpected = 'kexp' };
The listen key mode. The value of this property is a 2-byte unsigned integer that indicates whether the listen key operates in push-to-talk or toggle-listening mode. See
The listen key combination property. The value of this property is a 2-byte unsigned integer that specifies the key combination the user must press for the listen key. The high-order byte of this value has the same format as the high-order byte of the modifiers field of an event record. The low-order byte of this value has the same format as the key code contained in the message field of an event record. The value of a recognizers listen key combination property is whatever the user has selected in the Speech control panel. This property is read-only; you cannot set a property of this type.
The listen key name property. The value of this property is a string (of type Str63) that represents the listen key combination specified by the kSRListenKeyCombo property. The value of a recognizers listen key name property is whatever the user has selected in the Speech control panel. This property is read-only; you cannot set a property of this type.
The key word property. The value of this property is a string (of type Str255) that represents the key word that must precede utterances when the recognizer is in toggle-listen mode. The value of a recognizers key word property is whatever the user has selected in the Speech control panel. This property is read-only; you cannot set a property of this type.
The key expected flag. The value of this property is a Boolean value that indicates whether the recognizer expects the user to hold down a key or to utter the key word in order to have the recognizer begin listening (TRUE) or not (FALSE). The value of a recognizers key expected flag is a function of the users Speech control panel selections. This property is TRUE whenever text is visible below the feedback character in the lower-left corner of the feedback window. This property is read-only.
Every recognizer has a set of properties that you can inspect and change by calling the SRGetProperty and SRSetProperty functions. You specify a property by passing a property selector to those functions. The Speech Recognition Manager defines these property selectors for recognizers.
The listen key properties are provided for use by applications that want to provide their own visual feedback. If your application uses the default feedback mechanisms, you do not need to access those properties.
© 2000 Apple Computer, Inc. (Last Updated 7/10/2000)