Share via


ISpVoice (Windows CE 5.0)

Send Feedback

This interface enables an application to perform text synthesis operations. Applications can speak text strings and text files, or play audio files through this interface. These can be done synchronously or asynchronously.

Applications can choose a specific text-to-speech (TTS) voice using the ISpVoice::SetVoice method. The state of the voice (for example, rate, pitch, and volume), can be modified using SAPI XML tags that are embedded into the spoken text. Some attributes, like rate and volume, can be changed in real time using the ISpVoice::SetRate and ISpVoice::SetVolume methods. Voices can be set to different priorities using the ISpVoice::SetPriority.

ISpVoice inherits from the ISpEventSource interface. An ISpVoice object forwards events back to the application when the corresponding audio data has been rendered to the output device.

When to Implement

The following class IDs (CLSID) can be used with this interface. A complete CLSID listing for all interfaces is in the Class IDs section.

  • CLSID_SpVoice

Methods

The following table lists methods for the ISpVoice interface.

Method Description
DisplayUI Displays the requested UI.
GetAlertBoundary Gets the event that is currently being used as the insertion point for alerts.
GetOutputObjectToken Gets the object token for the current output object.
GetOutputStream Gets a pointer to the current output stream.
GetPriority Gets the current voice priority level.
GetRate Gets the current text rendering rate adjustment.
GetStatus Gets the current rendering and event status associated with this ISpVoice instance.
GetSyncSpeakTimeout Gets the timeout interval for synchronous speech operations for this ISpVoice instance.
GetVoice Gets the object token that identifies the voice used in text synthesis.
GetVolume Gets the current output volume level of the synthesizer.
IsUISupported Determines if the specified type of UI is supported.
Pause Pauses the voice at the nearest alert boundary and closes the output device.
Resume Sets the output device to the RUN state and resumes rendering.
SetAlertBoundary Specifies which event should be used as the insertion point for alerts.
SetOutput Sets the current output object. A value of NULL can be used to select the default audio device.
SetPriority Sets the priority for the voice. Normal, Alert, Over.
SetRate Sets the text rendering rate adjustment in real time.
SetSyncSpeakTimeout Sets the timeout interval in milliseconds after which, synchronous Speak and SpeakStream calls to this instance of the voice will timeout.
SetVoice Sets the identity of the voice used for text synthesis. By default, the ISpVoice will use the voice information set in Control Panel.
SetVolume Gets the current output volume level of the synthesizer.
Skip Causes the voice to skip ahead the specified number of items within the current speak request.
Speak Submits a string for rendering.
SpeakCompleteEvent Returns an event handle that will be signaled when the voice has completed speaking all pending requests.
SpeakStream Speaks the contents of a stream.
WaitUntilDone Blocks the caller until either the voice has completed speaking or the specified time interval has elapsed.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.