Share via


ISpTTSEngineSite::Write (SAPI 5.3)

Microsoft Speech API 5.3

ISpTTSEngineSite::Write

ISpTTSEngineSite::Write sends output data (normally audio) to SAPI.

  
    HRESULT Write(
   const void   *pBuff,
   ULONG         cb,
   ULONG        *pcbWritten
);

Parameters

  • pBuff
    Pointer to synthesized speech audio data. The output format is specified by SAPI as a parameter to the ISpTTSEngine::Speak call.
  • cb
    The buffer size, in bytes (not samples), of pBuff.
  • pcbWritten
    Pointer to a ULONG which receives the number of bytes actually copied.

Return values

Value
S_OK
E_INVALIDARG
E_POINTER
SPERR_UNINITIALIZED

Remarks

SAPI handles sending the audio data to the correct output destination. It is important that any events associated with the audio data are queued by calling ISpEventSink::AddEvents prior to calling this method. This ensures proper synchronization of event firing and audio rendering.