SpeechSynthesisConnector.AttachFlow(AudioVideoFlow) Method

Definition

Specifies which AudioVideoFlow will provide audio data for speech recognition. Only one AudioVideoFlow may be bound at a time.

C#
public void AttachFlow (Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoFlow audioVideoFlow);

Parameters

audioVideoFlow
AudioVideoFlow

The AudioVideoFlow to use

Exceptions

Thrown when an AudioVideoFlow is already attached or when an AudioVideoFlow is already attached to another SpeechSynthesisConnector.

Examples

The following example attaches and detaches a ToneController by the time AudioVideoFlow changes its state to Active and Terminated.

C# Attaching and detaching an AudioVideoFlow.


audioVideoFlow.StateChanged += delegate(object sender, MediaFlowStateChangedEventArgs args)
{
    AudioVideoFlow avFlow = (AudioVideoFlow)sender;

    if(avFlow.State == MediaFlowState.Active)
    {

        SpeechSynthesisConnector speechSynthesisConnector = new SpeechSynthesisConnector();
        speechSynthesisConnector.AttachFlow(avFlow);

    }
    else if(avFlow.State == MediaFlowState.Terminated)
    {

        SpeechSynthesisConnector speechSynthesisConnector = new SpeechSynthesisConnector();
        speechSynthesisConnector.AttachFlow(avFlow);

    }
};


Applies to

Producto Versiones
Lync UCMA 4.0, 5.0, latest