SPEVENTENUM (Windows Embedded CE 6.0)
1/6/2010
This enumeration defines SAPI events. Use the helper class CSpEvent to easily and clearly decode events. For more information, see the SPEVENT structure.
Syntax
typedef enum SPEVENTENUM{
SPEI_UNDEFINED = 0, // TTS engine
SPEI_START_INPUT_STREAM = 1,
SPEI_END_INPUT_STREAM = 2,
SPEI_VOICE_CHANGE = 3, // LPARAM_IS_TOKEN
SPEI_TTS_BOOKMARK = 4, // LPARAM_IS_STRING
SPEI_WORD_BOUNDARY = 5,
SPEI_PHONEME = 6,
SPEI_SENTENCE_BOUNDARY = 7,
SPEI_VISEME = 8,
SPEI_TTS_AUDIO_LEVEL = 9,
// Engine vendors use these reserved bits
SPEI_TTS_PRIVATE = 15,
SPEI_MIN_TTS = 1, // minimum TTS event value
SPEI_MAX_TTS = 15, // maximum TTS event value
//--- Speech Recognition
SPEI_END_SR_STREAM = 34, // SR engine has reached the end of an input stream
SPEI_SOUND_START = 35, // SR engine has detected the start of nontrivial audio data
SPEI_SOUND_END = 36, // SR engine has detected the end of nontrivial audio data
SPEI_PHRASE_START = 37, // SR engine has detected the start of a recognizable phrase
SPEI_RECOGNITION = 38, // SR engine's best hypothesis for the audio data
SPEI_HYPOTHESIS = 39, // SR engine's interim hypothesis for the result of the audio data
SPEI_SR_BOOKMARK = 40, // SR engine has reached the specified point in the audio stream
SPEI_PROPERTY_NUM_CHANGE = 41, // LPARAM points to a string, WPARAM is the attrib value
SPEI_PROPERTY_STRING_CHANGE = 42, // LPARAM pointer to buffer. Two concatinated null terminated strings.
SPEI_FALSE_RECOGNITION = 43, // apparent speech with no valid recognition
SPEI_INTERFERENCE = 44, // LPARAM is any combination of SPINTERFERENCE flags
SPEI_REQUEST_UI = 45, // LPARAM is string.
SPEI_RECO_STATE_CHANGE = 46, // wParam contains new reco state
SPEI_ADAPTATION = 47, // the adaptation buffer is now ready to be accepted
SPEI_START_SR_STREAM = 48, // SR engine has reached the start of an input stream
SPEI_RECO_OTHER_CONTEXT = 49, // Phrase finished and recognized, but for other context
SPEI_SR_AUDIO_LEVEL = 50, // input audio volume level
// Engine vendors use these reserved bits
SPEI_SR_PRIVATE = 52,
SPEI_MIN_SR = 34, // minimum SR event value
SPEI_MAX_SR = 52, // maximum SR event value
SPEI_RESERVED1 = 30, // do not use
SPEI_RESERVED2 = 33, // do not use
SPEI_RESERVED3 = 63 // do not use
} SPEVENTENUM;
Elements
- SPEI_UNDEFINED
Undefined.
- SPEI_START_INPUT_STREAM
Input stream (text or audio) from a speak or speak stream call has begun synthesizing to the output. SAPI fires the event.
- SPEI_END_INPUT_STREAM
Input stream (text or audio) from a speak or speak stream call has finished synthesizing to the output. SAPI fires the event.
- SPEI_VOICE_CHANGE
Voice changes have occurred within a single input stream of a speak call. The wParam value for the SPEVENT structure is either zero or SPF_PERSIST_XML. For more information, see the SPEAKFLAGS enumeration. The SPEVENT.lParam value is the current voice object token. The SPEVENT.elParamType value must be SPET_LPARAM_IS_TOKEN, as defined for the SPEVENTLPARAMTYPE enumeration.
- SPEI_TTS_BOOKMARK
A bookmark was inserted in the input stream. If an application specifies interest in bookmark events, it receives these events during synthesis. In the speak call, the SPEVENT.wParam value represents the current bookmark name (in base 10) converted to a long integer. If the name of current bookmark is not an integer, the wParam value is zero. The SPEVENT.lParam value specifies the bookmark string. The SPEVENT.elParamType value has to be SPET_LPARAM_IS_STRING, as defined for the SPEVENTLPARAMTYPE enumeration.
- SPEI_WORD_BOUNDARY
A word is beginning to synthesize. XML markers are counted in the boundaries and offsets. SPEVENT.wParam specifies the character length of the word in the current input stream being synthesized. The SPEVENT.lParam value is the character position in the current text input stream of the word being synthesized.
- SPEI_PHONEME
A phoneme was returned by the synthesis engine. The high word of the SPEVENT.wParam value is the duration, in milliseconds, of the current phoneme. The low word is the phonetic identifier for the next phoneme. The high word of the SPEVENT.lparam value is a phoneme feature, as defined in the SPVFEATURE enumeration. This value will be zero if the current phoneme is not primary stress or emphasis. The low word of the lParam value is the phonetic identifier for the current phoneme being synthesized.
- SPEI_SENTENCE_BOUNDARY
A sentence is beginning to synthesize. SPEVENT.wParam specifies the character length of the sentence, including punctuation, in the current input stream being synthesized. The SPEVENT.lParam value is the character position in the current text input stream of the sentence being synthesized.
- SPEI_VISEME
A viseme was determined by the synthesis engine. The high word of the SPEVENT.wParam value is the duration, in milliseconds, of the current viseme. The low word is for the next viseme of type SPVISEMES. The high word of the SPEVENT.lParam value is the viseme feature, as defined in the SPVFEATURE enumeration. This value is zero if the current viseme is not primary stress or emphasis. The low word of the lParam value is the current viseme being synthesized.
- SPEI_TTS_AUDIO_LEVEL
Audio level. The SPEVENT.lParam value is zero, and the SPEVENT.wParam value is the current audio level from 0 to 100. SAPI fires the event.
- SPEI_TTS_PRIVATE
Reserved for private/internal use by the TTS engine
- SPEI_MIN_TTS
Minimum event enumeration value for TTS events
- SPEI_MAX_TTS
Maximum event enumeration value for TTS events
- SPEI_END_SR_STREAM
The SR engine has finished receiving an audio input stream. SPEVENT.lParam points to the SR engine's final return code. SPEVENT.wParam points to a Boolean value signifying whether the audio input stream object has been released.
- SPEI_SOUND_START
The SR engine has determined that audible sound is available through the input stream.
- SPEI_SOUND_END
The SR engine has determined that audible sound is no longer available through the input stream, or that the sound stream has been inactive for a period.
- SPEI_PHRASE_START
The SR engine is starting to recognize a phrase. This event must be followed by either an SPEI_FALSE_RECOGNITION or SPEI_RECOGNITION event.
- SPEI_RECOGNITION
The SR engine is returning a full recognition, which is the engine's best guess at a text representation of the audio data. SPEVENT.lParam points to an object implementing ISpRecoResult.
- SPEI_HYPOTHESIS
The SR engine is retrieving a partial phrase recognition, which is effectively the engine's best guess up to that point in the stream. SPEVENT.lParam points to an object implementing ISpRecoResult.
- SPEI_SR_BOOKMARK
Bookmark was reached during synthesis. SPEVENT.lParam is an application-specified value set using ISpRecoContext::Bookmark. The value of SPEVENT.wParam is SPREF_AutoPause if ISpRecoContext::Bookmark was called with SPBO_PAUSE (defined by SPBOOKMARKOPTIONS), and NULL otherwise.
- SPEI_PROPERTY_NUM_CHANGE
An SR engine-supported property was changed. SPEVENT.lParam points to the property name that changed, while SPEVENT.wParam specifies the new value.
- SPEI_PROPERTY_STRING_CHANGE
An SR engine-supported property was changed. SPEVENT.lParam points to the property name that changed. Immediately following the null-termination of the property name is the new property value.
- SPEI_FALSE_RECOGNITION
The SR engine has found apparent speech with no valid recognition. An SR engine can optionally decide to retrieve a result object that is referenced by SPEVENT.lParam.
- SPEI_INTERFERENCE
The SR engine determined that the sound stream has a hindrance and is preventing a successful recognition. The SPEVENT.lParam value is any combination of flags defined by the SPINTERFERENCE enumeration.
- SPEI_REQUEST_UI
The SR engine requests to display a specific user interface. The SPEVENT.lParam value is a null-terminated string.
- SPEI_RECO_STATE_CHANGE
The recognizer state has changed. SPEVENT.wParam specifies the new recognizer state. For more information, see SPRECOSTATE.
- SPEI_ADAPTATION
The SR engine is ready to process the adaptation buffer.
- SPEI_START_SR_STREAM
The SR engine has reached the start of a new audio stream.
- SPEI_RECO_OTHER_CONTEXT
The SR engine has sent a recognition to another context
- SPEI_SR_AUDIO_LEVEL
Audio level. The SPEVENT.wParam value is the current audio level, from zero to 100. The audio input stream object fires the event.
- SPEI_SR_PRIVATE
Reserved for private or internal use by the SR engine
- SPEI_MIN_SR
Minimum event enumeration value for speech recognition events
- SPEI_MAX_SR
Maximum event enumeration value for speech recognition events
- SPEI_RESERVED1
Reserved for SAPI internal use. For more information, see Remarks for the SPFEI function.
- SPEI_RESERVED2
Reserved for SAPI internal use. For more information, see Remarks for the SPFEI function.
- SPEI_RESERVED3
Reserved for future use. Do not use.
Requirements
Header | sapi.h, sapi.idl |
Windows Embedded CE | Windows CE .NET 4.1 and later |
See Also
Reference
SAPI Enumerations
ISpRecoContext::Bookmark
ISpRecoResult
SPBOOKMARKOPTIONS
SPEAKFLAGS
SPEVENT
SPEVENTLPARAMTYPE
SPFEI
SPINTERFERENCE
SPVFEATURE
SPVISEMES