ISpRecoResult::SpeakAudio (Windows CE 5.0)
This method gets and speaks the specified audio. This combines two other methods, first calling ISpRecoResult::GetAudio and then ISpVoice::SpeakStream on the parent recognition context.
If the application did not start retained audio (see ISpRecoContext::SetAudioOptions), or make a previous call to ISpPhrase::Discard and eliminate the retained audio, then this method will fail with SPERR_NO_AUDIO_DATA.
HRESULT SpeakAudio(ULONG ulStartElement,ULONG cElements,DWORD dwFlags, ULONG* pulStreamNumber);
Parameters
- ulStartElement
[in] Element with which to start. - cElements
[in] Number of elements contained in the stream. A value of zero speaks all elements. - dwFlags
[in] Attributes of the text stream. Possible values are defined for the SPEAKFLAGS enumeration. - pulStreamNumber
[out, optional] Pointer to stream number information, or to NULL if no stream number is retrieved.
Return Values
The following table shows the possible return values. Return values can also be those from ISpVoice::SpeakStream.
Value | Description |
---|---|
S_OK | Function completed successfully. |
SPERR_NO_AUDIO_DATA | Result does not contain audio data. |
E_POINTER | pulStreamNumber is a non-null, bad pointer. |
FAILED(hr) | Appropriate error message. |
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.
See Also
ISpRecoResult | SAPI Interfaces
Send Feedback on this topic to the authors