Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Browser.SetInputToAudioStream Method
Assigns a specific audio stream as the input for the speech recognition engine.
Namespace: Microsoft.Speech.VoiceXml
Assembly: Microsoft.Speech.VoiceXml (in Microsoft.Speech.VoiceXml.dll)
Syntax
'Declaration
Protected Sub SetInputToAudioStream ( _
audioSource As Stream, _
audioSourceFormat As SpeechAudioFormatInfo _
)
'Usage
Dim audioSource As Stream
Dim audioSourceFormat As SpeechAudioFormatInfo
Me.SetInputToAudioStream(audioSource, _
audioSourceFormat)
protected void SetInputToAudioStream(
Stream audioSource,
SpeechAudioFormatInfo audioSourceFormat
)
Parameters
- audioSource
Type: System.IO.Stream
The specific stream that will be the input for the speech recognition engine.
- audioSourceFormat
Type: Microsoft.Speech.AudioFormat.SpeechAudioFormatInfo
The format of the audio in the input stream.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Thrown when the SetInputToAudioStream(Stream audioSource, SpeechAudioFormatInfo audioSourceFormat) method is called on a Browser instance that is running. |