IAPCSpeech::SpeakEx

This method speaks the null-terminated string stored in pszSpeak using text-to-speech (TTS).

Syntax

HRESULT IAPCSpeech::SpeakEx( DWORD dwContext, WCHAR *pszSpeak, DWORD dwID, DWORD dwFlag, PVOID p );

Parameters

dwContext
Specifies the context to use for text normalization while speaking phrase.
pszSpeak
Pointer to the null-terminated string that contains the text to be spoken. The length of the string must be less than 2 kilobytes (KB). Strings longer than 2 KB cause unexpected speech behavior.
dwID
Specifies the bookmark identifier. This parameter is ignored if it is 0.
dwFlag
Specifies a bitmask of flags. It is one of the following values:
0
Plays the TTS in the foreground and does not spell out words or speak individual digits. This value is the default value.
APCSPCH_SP_BACKGROUND
Plays the TTS in the background, preventing interruptions caused by normal keystrokes or by a PUSH TO TALK button.
APCSPCH_TN_SPELLING_CTX
Speaks the letters and digits in pszSpeak individually, instead of using words or using numbers larger than 9.
p
Reserved; set to 0.

Return Values

An appropriate HRESULT value is returned.

Remarks

The APCSPCH_SP_BACKGROUND flag should be used only when you are certain that you want to play the TTS in the background.