Class SilenceDetectionEventArgs
- Namespace
- VisioForge.Core.Types.Events
- Assembly
- VisioForge.Core.dll
Event arguments for silence detection events that are raised when silence starts or ends in an audio stream. Provides detailed information about the timing and characteristics of the detected silence period, enabling applications to respond to audio level changes in real-time for recording, streaming, or analysis purposes.
public class SilenceDetectionEventArgs : EventArgsInheritance
Inherited Members
Constructors
SilenceDetectionEventArgs(TimeSpan, bool, double, double, SilencePeriod)
Initializes a new instance of the VisioForge.Core.Types.Events.SilenceDetectionEventArgs class for a silence start or end event.
public SilenceDetectionEventArgs(TimeSpan timestamp, bool isSilenceStart, double levelDb, double thresholdDb, SilencePeriod period = null)Parameters
timestampTimeSpan-
The timestamp of the event.
isSilenceStartbool-
True if this is a silence start event, false for silence end.
levelDbdouble-
The audio level in decibels at the time of the event.
thresholdDbdouble-
The silence detection threshold in decibels.
periodSilencePeriod-
The completed silence period (for silence end events only), or null.
Properties
IsSilenceStart
Gets a value indicating whether this event represents the start of a silence period. True for silence start events, false for silence end events.
public bool IsSilenceStart { get; }Property Value
LevelDb
Gets the audio level in decibels (dB) at the time of this event. This is the RMS level that triggered the silence state change.
public double LevelDb { get; }Property Value
Period
Gets the complete silence period information when silence ends. This property is only populated for silence end events and contains the start time, end time, and duration of the completed silence period. Returns null for silence start events.
public SilencePeriod Period { get; }Property Value
ThresholdDb
Gets the configured silence detection threshold in decibels (dB). Audio levels below this threshold are considered silence.
public double ThresholdDb { get; }Property Value
Timestamp
Gets the timestamp of the silence detection event in the audio stream. For silence start events, this is when audio level dropped below threshold. For silence end events, this is when audio level rose above threshold.
public TimeSpan Timestamp { get; }