![Collapse image Collapse image](collapse_all.gif)
![Expand Image Expand Image](expand_all.gif)
![](collapse_all.gif)
![](expand_all.gif)
![](dropdown.gif)
![](dropdownHover.gif)
![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
![]() ![]() |
SpeechRecognitionEngine..::..SetInputToAudioStream Method |
SpeechRecognitionEngine Class See Also Send Feedback |
Configures the SpeechRecognitionEngine object to receive input from an audio stream.
Namespace:
Microsoft.Speech.Recognition
Assembly:
Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub SetInputToAudioStream ( _ audioSource As Stream, _ audioFormat As SpeechAudioFormatInfo _ ) |
Visual Basic (Usage) |
---|
Dim instance As SpeechRecognitionEngine Dim audioSource As Stream Dim audioFormat As SpeechAudioFormatInfo instance.SetInputToAudioStream(audioSource, _ audioFormat) |
C# |
---|
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.
Remarks
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.