IAgentNotifySinkEx::ListeningState

[Microsoft Agent is deprecated as of Windows 7, and may be unavailable in subsequent versions of Windows.]

HRESULT ListeningState(
   long dwCharacterID,  // character ID
   long bListening,     // listening mode state
   long dwCause         // cause  
);

Notifies a client application when the Listening mode changes.

  • No return value.

dwCharacterID

The character for which the listening state changed.

bListening

The Listening mode state. True indicates that Listening mode has started; False, that Listening mode has ended.

dwCause

The cause for the event, which may be one of the following values.

Value Description
const unsigned long LSCOMPLETE_CAUSE_PROGRAMDISABLED = 1;
Listening mode was turned off by program code.
const unsigned long LSCOMPLETE_CAUSE_PROGRAMTIMEDOUT = 2;
Listening mode (turned on by program code) timed out.
const unsigned long LSCOMPLETE_CAUSE_USERTIMEDOUT = 3;
Listening mode (turned on by the Listening key) timed out.
const unsigned long LSCOMPLETE_CAUSE_USERRELEASEDKEY = 4;
Listening mode was turned off because the user released the Listening key.
const unsigned long LSCOMPLETE_CAUSE_USERUTTERANCEENDED = 5;
Listening mode was turned off because the user finished speaking.
const unsigned long LSCOMPLETE_CAUSE_CLIENTDEACTIVATED = 6;
Listening mode was turned off because the input active client was deactivated.
const unsigned long LSCOMPLETE_CAUSE_DEFAULTCHARCHANGE = 7
Listening mode was turned off because the default character was changed.
const unsigned long LSCOMPLETE_CAUSE_USERDISABLED = 8
Listening mode was turned off because the user disabled speech input.

This event is sent to all clients when the Listening mode begins after the user presses the Listening key or when its time-out ends, or when the input-active client calls the IAgentCharacterEx::Listen method with True or False.

The event returns values to the clients that currently have this character loaded. All other clients receive a null character (empty string).

See Also

IAgentCharacterEx::Listen