@vpalmisano/webrtcperf-js
    Preparing search index...

    Function detectVoiceActivity

    • It detects voice activity on an audio track and calls the callback with the start and stop times.

      Parameters

      • track: MediaStreamTrack

        The track to detect voice activity on.

      • minTalkingDurationMs: number = 40

        The minimum talking duration in milliseconds to detect voice start.

      • minSilentDurationMs: number = 500

        The minimum silent duration in milliseconds to detect voice stop.

      • Optionalcallback: (event: "stop" | "start", startTime: number, stopTime: number) => void

        The callback to call with the start and stop times.

      Returns undefined | ((reason?: string) => void)

      The cleanup function to stop the detection.