Partager via


ISpVoice (SAPI 5.4)

Microsoft Speech API 5.4

ISpVoice

The ISpVoice interface enables an application to perform text synthesis operations. Applications can speak text strings and text files, or play audio files through this interface. All of these can be done synchronously or asynchronously.

Applications can choose a specific TTS voice using ISpVoice::SetVoice. 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 ISpVoice::SetRate and ISpVoice::SetVolume. Voices can be set to different priorities using 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.

Associated Class IDs

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

CLSID_SpVoice

Methods in Vtable Order

ISpVoice Methods
ISpEventSource inherited methods
SetOutput
GetOutputObjectToken
GetOutputStream
Pause
Resume
SetVoice
GetVoice
Speak
SpeakStream
GetStatus
Skip
SetPriority
GetPriority
SetAlertBoundary
GetAlertBoundary
SetRate
GetRate
SetVolume
GetVolume
WaitUntilDone
SetSyncSpeakTimeout
GetSyncSpeakTimeout
SpeakCompleteEvent
IsUISupported
DisplayUI