This method sets a context rule used to normalize a text string before sending the string to the text-to-speech (TTS) engine.
HRESULT IAPCSpeech::SetSpkContextRule ( DWORD dwContextID, DWORD dwFlags, LPCTSTR lpctStr1, LPCTSTR lpctStr2, LPVOID p );
An appropriate HRESULT value is returned.
The following can be used as delimiters for this method:
In an address. numbers are usually pronounced differently. For example, 98052 would be “9-8-0-5-2,” while 5345 would be “fifty-three forty-five.” To use this special context, the application can create a text-to-speech (TTS) context and pass APCSPCH_TN_ADDR_CTX as the dwFlag in the SetSpkContextRule method.
For APCSPCH_TN_PHONE_CTX, the TTS engine pronounces the pound sign (#) as "pound," and the asterisk (*) as "star." The left brace, right brace, left bracket, right bracket, left parenthesis, right parenthesis, comma, period, caret, and space characters result in a pause in speech. The TTS engine combines multiple pauses into a single pause. The TTS engine always pronounces the number 0 as "zero." The TTS engine pronounces digits and letters individually, rather than stringing them together as large numbers or words.
If APCSPCH_TN_PHONE_CTX or APCSPCH_TN_SPELLING is set, all other flags are ignored.
APCSPCH_TN_WORD and APCSPCH_TN_ADDR_CTX can be combined.