Share via


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.

Exceptions

Exception Condition
InvalidOperationException

Thrown when the SetInputToAudioStream(Stream audioSource, SpeechAudioFormatInfo audioSourceFormat) method is called on a Browser instance that is running.

See Also

Reference

Browser Class

Browser Members

Microsoft.Speech.VoiceXml Namespace