Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SetInputToAudioStream Method

SpeechRecognitionEngine.SetInputToAudioStream Method

Configures the SpeechRecognitionEngine object to receive input from an audio stream.

Namespace:  Microsoft.Speech.Recognition
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

public void SetInputToAudioStream(
	Stream audioSource,
	SpeechAudioFormatInfo audioFormat
)

Parameters

audioSource
Type: System.IO.Stream
The audio input stream.
audioFormat
Type: Microsoft.Speech.AudioFormat.SpeechAudioFormatInfo
The format of the audio input.

If the recognizer reaches the end of the input stream during a recognition operation, the recognition operation finalizes with the available input. Any subsequent recognition operations can generate an exception, unless you update the input to the recognizer.

Show:
© 2015 Microsoft