This method creates a new speak context, which allows an application to do pre-text normalization.
HRESULT IAPCSpeech::CreateSpkContext ( IAPCSpeech *pSpeech, DWORD dwContext, DWORD dwFlag PDWORD *pNewContext );
Flag |
Value |
Description |
APCSPCH_TN_CONTEXT_NEW | 0x0001 | Creates a new empty context. |
APCSPCH_TN_CONTEXT_COPY | 0x0002 | Creates a new context based on an existing context by copying all the rules from the existing context. |
APCSPCH_TN_CONTEXT_EXTEND | 0x0003 | Extends a new context by linking it to an existing one. |
S_OK indicates success.
An application does not need to create a new speak context in order to use text-to-speech (TTS) because, by default, there is always one speak context with an identifier of 0. An application can also create additional contexts and use IAPCSpeech::SpeakEx to use the new contexts.
When APCSPCH_TN_CONTEXT_EXTEND is used, it can only extend rules of APCSPCH_TN_WORD.
A context can only be extended once.