Share via


ISpRecognizer::GetInputStream

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method gets the input stream that is currently being used. Applications will not typically need to use this method, but it can be used to find the specific audio input stream that is being used. This method can only be used on InProc recognizers, not on the shared recognizer.

The retrieved object will implement IStream, ISpStreamFormat, and ISpAudio for real-time streams. Applications should NOT use methods on these interfaces that actually change the state of the audio device or read data from it. For example, reading data from the application with IStream::Read will prevent the correct data from being passed to the SR engine. Altering the state of the audio by using ISpAudio::SetState will put the audio device into an unexpected state and can cause errors. All control of the audio is done by SAPI.

Syntax

HRESULT GetInputStream(
  ISpStreamFormat** ppStream
);

Parameters

  • ppStream
    [out] Address of a pointer to an object implementing ISpStreamFormat that represents the input stream information.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

E_POINTER

ppStream is invalid or bad.

SPERR_NOT_SUPPORTED_FOR_SHARED_RECOGNIZER

Method is not available when using the shared recognizer.

FAILED(hr)

Appropriate error message.

Requirements

Header sapi.h, sapi.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpRecognizer
SAPI Interfaces