Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

ISpRecognizer::GetInputStream

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

 

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT GetInputStream(</strong><a runat="server" href="jj127807(v=msdn.10).md"><strong>ISpStreamFormat</strong></a> **<em>ppStream</em> <strong>);</strong> </pre>

Parameters

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

Return Values

Value Description
S_OK Function completed successfully.
E_POINTER ppStream is invalid or bad.
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.

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 ISequentialStream::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 the Speech Platform.