Share via


Microsoft Speech SDK Version 5.1

ISpMMSysAudio

This is the interface to the audio implementation for the standard Windows multimedia layer (wave in and wave out). Audio objects created through an object token do not allow ISpMMSysAudio::SetDeviceId to work because the token specifies which audio device ID to use. If an application wants to associate an audio object with a specific multimedia wave in or wave out device ID, it should use CoCreateInstance with CLSID_SpMMAudioOut or CLSID_SpMMAudioIn and then use the ISpMMSysAudio::SetDeviceId method to select the device. In normal application development, this will not be necessary for two reasons: 

  • Desktop applications will generally use the shared recognizer instance which automatically uses the default audio device. This cannot be changed. 
  • For the InProc recognizer instance, the audio device will attempt to use the default device id automatically.

For input devices, SAPI will attempt to automatically identify the microphone line on the input device. On non-English versions of Windows and on a small number of English systems, it may not be possible for SAPI to automatically detect the correct microphone line. In this case, no error will be detected or returned. In such cases, if speech input is not correctly detected, the user must set the microphone input line directly using Speech properties in Control Panel-->Speech Recognition tab-->Audio Input Settings-->Properties. In particular, it may be necessary to adjust the microphone input line used on devices with multiple microphone inputs such as the SoundBlaster Live Platinum because the default input line may not be the input preferred by the user.

Implemented By

Methods in Vtable Order

ISpMMSysAudio Methods Description
ISpStreamFormat interface Inherits from ISpStreamFormat and all methods are accessible from an ISpMMSysAudio object.
ISpAudio interface Inherits from ISpAudio and all methods are accessible from an ISpMMSysAudio object.
GetDeviceId Passes back the multimedia device ID being used by the audio object.
SetDeviceId Sets the multimedia device ID.
GetMMHandle Passes back a multimedia audio stream handle.
GetLineId Retrieves the line identifier associated with the multimedia device.
SetLineId Sets the line identifier associated with the multimedia device.

IStream functions as inherited from ISpAudio

Please see the MSDN IStream interface topic for a complete description of the IStream interface.

IStream Methods Description
Seek Retrieves only the current device position because multimedia devices represent hardware.
SetSize Not used because multimedia devices represent hardware.
CopyTo Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.
Commit Updates device state and commit buffered data. SAPI will automatically manage device state and buffered data, so that the developer is not expected to call this method.
Revert Returns E_NOTIMPL because multimedia devices represent hardware.
LockRegion Returns E_NOTIMPL because multimedia devices represent hardware.
UnlockRegion Returns E_NOTIMPL because multimedia devices represent hardware.
Stat Retrieves the current device position.
Clone Returns E_NOTIMPL because multimedia devices represent hardware.