Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
ISpMMSysAudio
This is the interface to the audio implementation for input and output of audio files. 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 because the audio device will attempt to use the default device id automatically.
For input devices, the Speech Platform will attempt to automatically identify the microphone line on the input device. If the Speech Platform cannot identify the microphone line, no error will be detected or returned. If speech input is not correctly detected, it may be necessary to adjust the microphone input line used on devices with multiple microphone inputs.
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 by ISpAudio
The following provides a brief description of the methods that ISpAudio inherits from the IStream interface. See IStream interface on MSDN 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. The Speech Platform 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. |