ISpTTSEngineSite::Write (SAPI 5.4)
Microsoft Speech API 5.4
ISpTTSEngineSite::Write sends output data (normally audio) to SAPI.
HRESULT Write( const void *pBuff, ULONG cb, ULONG *pcbWritten );
Pointer to synthesized speech audio data. The output format is specified by SAPI as a parameter to the ISpTTSEngine::Speak call.
The buffer size, in bytes (not samples), of pBuff.
Pointer to a ULONG which receives the number of bytes actually copied.
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.