Share via


Recorder.VoiceActivityChanged Event

Raised to notify an application that recorder detected a change in voice state (noise or voice).

Namespace:  Microsoft.Rtc.Collaboration.AudioVideo
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Event VoiceActivityChanged As EventHandler(Of VoiceActivityChangedEventArgs)
'Usage
Dim instance As Recorder
Dim handler As EventHandler(Of VoiceActivityChangedEventArgs)

AddHandler instance.VoiceActivityChanged, handler
public event EventHandler<VoiceActivityChangedEventArgs> VoiceActivityChanged

Examples

The following example show how to subscribe to VoiceActivityChanged event.

C# Subscribing to VoiceActivityChanged event.

 

            recorder.VoiceActivityChanged += delegate(object sender, VoiceActivityChangedEventArgs args)
            {
                TimeSpan timeStamp = args.TimeStamp;
                bool isVoice = args.IsVoice;

                // Do whatever it needs with recorder.
            };


See Also

Reference

Recorder Class

Recorder Members

Microsoft.Rtc.Collaboration.AudioVideo Namespace