ISpVoice::SpeakStream (Windows CE 5.0)

Send Feedback

This method speaks the contents of a stream.

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 Values

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

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

ISpVoice | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.