ISpTTSEngine::GetOutputFormat

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpTTSEngine::GetOutputFormat

ISpTTSEngine::GetOutputFormat queries the engine about a specific output format. The engine should examine the requested output format, and return the closest format that it supports.

HRESULT GetOutputFormat(
   const GUID          *pTargetFmtId,
   const WAVEFORMATEX  *pTargetWaveFormatEx,
   GUID                *pOutputFormatId,
   WAVEFORMATEX       **ppCoMemOutputWaveFormatEx
);

Parameters

pTargetFmtId
[in] Address of the GUID describing the requested output format.
SPDFID_TextEngines are not required to support this format, nor are they required to do anything specific with this format if they do support it.  It is provided merely for debugging purposes.
SPDFID_WaveFormatExpWaveFormatEx will be a WAVEFORMATEX structure.
pTargetWaveFormatEx
[in] Pointer to the WAVEFORMATEX structure describing the requested output format.
Will be NULL if pTargetFmtId is SPDFID_Text.
pOutputFormatId
[out] Address of a GUID to receive the engine's supported output format identifier.
SPDFID_TextIf the engine does support SPDFID_Text, SPDFID_Text should be used, and ppCoMemOutputWaveFormatEx should be set to NULL.
SPDFID_WaveFormatExOutput format will be described by a WAVEFORMATEX structure.
ppCoMemOutputWaveFormatEx
[out] The engine allocates space for a WAVEFORMATEX structure using CoTaskMemAlloc.  This structure describes the supported output format.