ISpVoice::SpeakStream (Windows Embedded CE 6.0)
1/6/2010
This method speaks the contents of a stream.
Syntax
HRESULT SpeakStream(
IStream* pStream,
DWORD dwFlags,
ULONG* pulStreamNumber
);
Parameters
- pStream
[in] Pointer to an IStream implementation representing the input stream. If the ISpStreamFormat interface is not implemented by the input stream, the format type is assumed to be SPDFID_Text.
- dwFlags
[in] Flags used to control the rendering process for this call. Possible values are defined by the SPEAKFLAGS enumeration. Note that the SPF_IS_FILENAME value is not used for this method.
- pulStreamNumber
[out] Pointer to the current input stream number. Each time a string is spoken, an associated stream number is retrieved. Events queued back to the application related to this string will contain this number.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
E_INVALIDARG |
One or more arguments are invalid. |
E_POINTER |
Invalid pointer. |
E_OUTOFMEMORY |
Exceeded available memory. |
SPERR_INVALID_FLAGS |
Invalid flags specified for this operation. |
SPERR_DEVICE_BUSY |
Timeout on synchronous call. |
Remarks
If the input stream is wav data, it is sent directly to the output object.
If the input stream is text data, it is processed by the TTS engine.
Typically, pulStreamNumber will be 1. However, if several asynchronous SpeakStream (or Speak) calls are received and must be queued, the stream number will be incremented for each call.
Requirements
Header | sapi.h, sapi.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |