


Controlling Queuing with Flags
The TextToSpeechSpeak call passes a null terminated string of characters to the text-to-speech
system. The system queues all characters up to the null character.
The following three examples illustrate the use of the
TTS_NORMAL flag:
TextToSpeechSpeak( phTTS, "This will be spoken. ", TTS_NORMAL );
This text is spoken immediately by the system because it is terminated by a
period and a space. These last two characters are one way to create a clause
boundary.
TextToSpeechSpeak( phTTS, "This will be spok", TTS_NORMAL );
This produces output only after the following line of code executes to
complete the phrase.
TextToSpeechSpeak( phTTS, "en. ", TTS_NORMAL );
If the TTS_FORCE argument is not used in the call to TextToSpeechSpeak, then
the queued characters are seamlessly concatenated with previously queued
characters.
The
TTS_FORCE argument forces a string of characters to be spoken even though the string
might not complete a clause.
The following example shows how a nonphrase string can be forced to be spoken
by using the TTS_FORCE argument.
TextToSpeechSpeak( phTTS, "This will be spok", TTS_FORCE );
Note that the word spoken is not pronounced correctly in this case even if the final characters, en are queued immediately afterward.
The TTS_FORCE argument causes the previous line to be spoken before taking any
subsequently queued characters into account.