WM_SPCH_NOTIFY
This message notifies the application of speech related activity.
Parameters
- wParam
- It is one of the following values, depending on the options that are specified in the CreateAPCSpeechObject call:
- VCMDRF_CMDSTART
- The engine detects the beginning of a phrase.
- VCMDRF_CMDOTHER
- If lParam is nonzero, a phrase is recognized in another grammar. If lParam is zero, a phrase is ended without being recognized.
- VCMDRF_ATTRIBCHANGE
- Speech attributes have changed.
- VTXTF_SPEAKDONE
- The engine stopped speaking.
- VTXTF_SPEAKSTOP
- The engine’s text-to-speech output was stopped by an application.
- VTXTF_SPEAK
- The engine encountered a bookmark. The lParam is the bookmark identifier.
Remarks
An application can embed “\mrk=xx\” strings inside the text to be spoken to create a bookmark. When the speech engine encounters a bookmark, a WM_SPCH_NOTIFY message with wParam equal to VTXTF_SPEAK and lParam equal to the bookmark identifier is posted to the application. The traditional Speak(string, ID) also works because the system adds “\mrk=ID\” before the string and then sends it to the engine.