IVTxtAttributes::IsSpeaking

HRESULT IsSpeaking(BOOL *pfSpeaking);

Indicates whether text is currently being spoken by a voice-text site.

· Returns NOERROR if successful, or one of these error values:

VTXTERR_INVALIDMODE
VTXTERR_INVALIDPARAM
VTXTERR_OUTOFMEM

pfSpeaking

[out] Address of a variable that receives the current speaking status. The variable receives TRUE if the text-to-speech engine is speaking or FALSE if it is silent.

IsSpeaking corresponds to the ITTSNotifySink::AudioStart and AudioStop notifications. However, the voice text object does not send data resulting from multiple calls to the IVoiceText::Speak member function directly to the text-to-speech engine. Instead, the object keeps data from each call in a separate buffer so that the VTXTSP_HIGH and VTXTSP_VERYHIGH priority strings can be inserted into the queue at the proper positions. For example, a VTXTSP_VERYHIGH priority string may interrupt a high or normal priority string. The interrupted string resumes after the very high priority string has finished. As a result of this implementation, IsSpeaking returns FALSE for a short time between the end of one buffer in the queue and the start of the next buffer, because audio output has been temporarily suspended.