Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Microsoft Speech API 5.4
ISpRecognizer::GetFormat
ISpRecognizer::GetFormat retrieves the current input audio format.
HRESULT GetFormat(
SPSTREAMFORMATTYPE WaveFormatType,
GUID *pFormatId,
WAVEFORMATEX **ppCoMemWFEX
);
Parameters
- WaveFormatType
[in] One of the wave file format types specified in SPSTREAMFORMATTYPE. - pFormatId
[out] The address of the unique identifier associated with the format type. - ppCoMemWFEX
[out] Address of a pointer to a WAVEFORMATEX structure that receives the format information. This is set only if the input is of a wave format type. The application must free this data with CoTaskMemFree after use.
Return values
Value |
S_OK |
E_POINTER |
SPERR_UNINITIALIZED |
FAILED(hr) |
Remarks
This method can return either the input format or the engine format. Normally these two values will be the same, but if SAPI is using a format converter to convert the input data from the audio input to the engine format these will be different.