Speech

Once you have registered a voice-text site and notification interface, you can play text over the site by using the IVoiceText::Speak member function. Speak places a text string into the playback queue for the site. The engine removes the string from the queue and converts the words in the string into speech, using the space characters and punctuation in the string to determine the start and end of words and the inflections to use when speaking the words.

When calling Speak, an application specifies the address of a buffer that contains the text to speak, a pair of flags that indicate the type and priority level of the text, and any optional control tags. The text-to-speech engine uses the type flag and the control tags to set various qualities of the speaking voice. It uses the priority-level flag to determine how quickly to remove the text from the buffer and establish whether to preempt text that is already in the queue or is currently being spoken. For more information about control tags, see Appendix A, "Text-to-Speech Control Tags."

Once speech is started, all words in the given string are spoken sequentially unless the application stops the speech by using the IVoiceText::AudioPause or IVoiceText::StopSpeaking member function. If AudioPause is used, the application can resume the speech at the point it stopped by using the IVoiceText::AudioResume member function. If StopSpeaking is used, the speech cannot be resumed because all remaining words in the text are deleted from the playback queue.

An application can skip over words or replay portions of the speech by using the IVoiceText::AudioFastForward and IVoiceText::AudioRewind member functions.