Export (0) Print
Expand All

ISpMMSysAudio (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

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 MethodsDescription
ISpStreamFormat interfaceInherits from ISpStreamFormat and all methods are accessible from an ISpMMSysAudio object.
ISpAudio interfaceInherits from ISpAudio and all methods are accessible from an ISpMMSysAudio object.
GetDeviceIdPasses back the multimedia device ID being used by the audio object.
SetDeviceIdSets the multimedia device ID.
GetMMHandlePasses back a multimedia audio stream handle.
GetLineIdRetrieves the line identifier associated with the multimedia device.
SetLineIdSets 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 MethodsDescription
SeekRetrieves only the current device position because multimedia devices represent hardware.
SetSizeNot used because multimedia devices represent hardware.
CopyToCopies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.
CommitUpdates 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.
RevertReturns E_NOTIMPL because multimedia devices represent hardware.
LockRegionReturns E_NOTIMPL because multimedia devices represent hardware.
UnlockRegionReturns E_NOTIMPL because multimedia devices represent hardware.
StatRetrieves the current device position.
CloneReturns E_NOTIMPL because multimedia devices represent hardware.
Show:
© 2014 Microsoft