ISpRecoResult::SpeakAudio (Windows Embedded CE 6.0)
1/6/2010
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.
Syntax
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 Value
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
Header | sapi.h, sapi.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |