Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultActiveSpeakerPolicy

Hierarchy

  • DefaultActiveSpeakerPolicy

Implements

Index

Constructors

constructor

  • new DefaultActiveSpeakerPolicy(speakerWeight?: number, cutoffThreshold?: number, silenceThreshold?: number, takeoverRate?: number): DefaultActiveSpeakerPolicy
  • Creates active speaker policy with speakerWeight, cutoffThreshold, silenceThreshold, and takeoverRate.

    Parameters

    • speakerWeight: number = 0.9

      The number used to calculate new active speaker score for current attendee.

      Formula:
      updatedCurrentAttendeeScore = currentAttendeeExistingScore * speakerWeight + currentReceivedVolume * (1 - speakerWeight)
      
    • cutoffThreshold: number = 0.01

      The threshold number compared with updated active speaker score. If the updated active speaker score is less than this threshold value, the updated score is returned as 0, else the updated score is returned.

    • silenceThreshold: number = 0.2

      The threshold number compared with current received volume. While calculating the new active speaker score, if the current received volume is less than this threshold value, the current received volume is considered as 0, else 1.

    • takeoverRate: number = 0.2

      The number used to calculate other attendee's active speaker score, other than the current attendee.

      Formula:
       updatedOtherAttendeeActiveSpeakerScore = Math.max(
         existingOtherAttendeeActiveSpeakerScore - takeoverRate * currentReceivedVolume,
         0
       );
      

    Returns DefaultActiveSpeakerPolicy

Methods

calculateScore

  • calculateScore(attendeeId: string, volume: number, muted: boolean): number

prioritizeVideoSendBandwidthForActiveSpeaker

  • prioritizeVideoSendBandwidthForActiveSpeaker(): boolean

Generated using TypeDoc