Partager via


ISpTTSEngine::Speak (SAPI 5.3)

Microsoft Speech API 5.3

ISpTTSEngine::Speak

ISpTTSEngine::Speak renders the specified text fragment list in the specified output format.

  
    HRESULT Speak(
   DWORD                 dwSpeakFlags,
   REFGUID               rguidFormatId,
   const WaveFormatEx   *pWaveFormatEx,
   const SPVTEXTFRAG    *pTextFragList,
ISpTTSEngineSite     *pOutputSite
);

Parameters

  • dwSpeakFlags
    [in] Possible values are contained in the SPEAKFLAGS enumeration, but all values other than SPF_NLP_SPEAK_PUNC will be masked off. If SPF_NLP_SPEAK_PUNC is set, the engine should speak all punctuation (e.g., "This is a sentence." should be expanded to "This is a sentence period").

  • rguidFormatId
    [in] The stream format identifier describing the required output format. This format is guaranteed to be one that the engine specified as supported in a previous GetOutputFormat call.

    SPDFID_Text Engines 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_WaveFormatEx pWaveFormatEx will be a WAVEFORMATEX structure describing an output format specified by the engine in a previous GetOutputFormat call.
  • pWaveFormatEx
    [in] Pointer to a WAVEFORMATEX structure describing the output format. Will be NULL if rguidFormatID is SPDFID_Text.

  • pTextFragList
    [in] A linked list of SPVTEXTFRAGs to synthesize.  See the TTS Engine Vendor Porting Guide for more information.

  • pOutputSite
    [in] Pointer to an ISpTTSEngineSite where audio data and events should be written.