Voice-Text Object

Purpose

Manages the use of voice text by all applications that use a voice-text site. The voice-text object represents a voice-text site on the user's computer. A voice-text site consists of an audio device, such as a computer speaker or telephone line, and a text-to-speech mode provided by an engine. Internally, a voice-text site consists of two low-level text-to-speech objects: a text-to-speech engine object and an audio destination.

Creation

An application creates a voice-text object by calling the CoCreateInstance function with the CLSID_VTxt class identifier and the IID_IVoiceText interface identifier. CoCreateInstance returns a pointer to the IVoiceText interface for the voice-text object.

Interaction

The voice-text object calls an application's IVTxtNotifySink interface to notify the application of speech-related events. An application must create a COM object that supports the IVTxtNotifySink interface and must pass the address of the interface to the voice-text object when calling the IVoiceText::Register member function. The application developer determines how the functions in the interface respond to notifications.

A text-to-speech mode can be identified by using a text-to-speech enumerator, which enumerates the text-to-speech modes provided by all engines on the user's computer. For more information about text-to-speech enumerators, see the section, "Low-Level Text-to-Speech API."

Interfaces

The voice-text object supports the following interfaces.

· IVTxtAttributes. Controls attributes of a voice-text site, such as the audio device, the speaking speed, the text-to-speech mode, and whether text-to-speech is enabled for the site.

· IVTxtDialogs. Displays Windows dialog boxes that allow a user to configure the text-to-speech engine. These dialog boxes are defined by the engine.

· IVoiceText. Registers an application to use voice text on a site and controls the playback of text.