Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ISpRecognizer::GetInputStream (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpRecognizer::GetInputStream

ISpRecognizer::GetInputStream retrieves the input stream that is currently being used.

 

HRESULT GetInputStream(
   ISpStreamFormat   **ppStream
);

Parameters

ppStream
[out] Address of a pointer to the ISpStreamFormat object that receives the input stream information.

Return values

ValueDescription
S_OKFunction completed successfully.
E_POINTERppStream is invalid or bad.
SPERR_NOT_SUPPORTED_FOR_SHARED_RECOGNIZERMethod is not available when using the shared recognizer.
FAILED(hr)Appropriate error message.

Remarks

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

The returned 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 using ISpAudio::SetState will put the audio device into an unexpected state and may cause errors. All control of the audio is done by SAPI.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.