ISpAudio (Microsoft Speech Platform)

Microsoft Speech Platform SDK 11

Microsoft Speech Platform

ISpAudio

Objects implementing this interface are real-time audio streams, such as those connected to a live microphone or telephone line. ISpAudio methods support of control of real-time audio streams. IStream Read and Write methods transfer data to or from an object.

When to Implement

This interface should be implemented when the audio input or output source is not a standard windows Multimedia device. It is expected to supply an infinite amount of data and hence its state should not change externally to SAPI. For the majority of users, it will not be necessary to implement an object providing this interface. An example of where this might be needed would be to provide a telephony audio device or to perform echo cancellation of audio output on the input.

Telephone application programming interface (TAPI) provides a mechanism to treat a telephony device as a Windows multimedia device allowing the use of the SAPI provided multimedia audio objects.

If this implements a real time audio input or output object and runs in a desktop or graphical environment, support may be needed for volume and audio properties UI. This will enable applications (including Speech properties in Control Panel) to display the UI in a simple and consistent manner.

In order to prevent multiple TTS voices or engines from speaking simultaneously, SAPI serializes output to objects which implement the ISpAudio interface. To disable serialization of outputs to an ISpAudio object, place an attribute called "NoSerializeAccess" in the Attributes folder of its object token.

Implemented By

Methods in Vtable Order

Value Description
ISpStreamFormat interface Inherits from ISpStreamFormat and all those methods are accessible from an ISpAudio object.
SetState Sets the state of the audio device.
SetFormat Sets the format of the audio device.
GetStatus Passes back the status of the audio device.
SetBufferInfo Sets the audio stream buffer information.
GetBufferInfo Passes back the audio stream buffer information.
GetDefaultFormat Passes back the default audio format.
EventHandle Returns a Win32 event handle that applications can use to wait for status changes in the I/O stream.
GetVolumeLevel Passes back the current volume level.
SetVolumeLevel Sets the current volume level.
GetBufferNotifySize Retrieves the audio stream buffer size information.
SetBufferNotifySize Sets the audio stream buffer size information.

Development Helpers

Helper Enumerations, Functions and Classes Description
SPSTREAMFORMAT SAPI supported stream formats.
CSpStreamFormat Class for managing SAPI supported stream formats and WAVEFORMATEX structures.