Edit

Share via


Recorder.VoiceActivityChanged Event

Definition

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

public:
 event EventHandler<Microsoft::Rtc::Collaboration::AudioVideo::VoiceActivityChangedEventArgs ^> ^ VoiceActivityChanged;
public event EventHandler<Microsoft.Rtc.Collaboration.AudioVideo.VoiceActivityChangedEventArgs> VoiceActivityChanged;
member this.VoiceActivityChanged : EventHandler<Microsoft.Rtc.Collaboration.AudioVideo.VoiceActivityChangedEventArgs> 
Public Custom Event VoiceActivityChanged As EventHandler(Of VoiceActivityChangedEventArgs) 

Event Type

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.
};



Applies to