Interface ActiveSpeakerDetector
Methods
subscribe
- subscribe(policy: ActiveSpeakerPolicy, callback: (activeSpeakers: string[]) => void, scoresCallback?: (scores: {}) => void, scoresCallbackIntervalMs?: number): void
-
Parameters
-
-
callback: (activeSpeakers: string[]) => void
-
- (activeSpeakers: string[]): void
-
Optional scoresCallback: (scores: {}) => void
-
-
Parameters
-
scores: {}
-
[attendeeId: string]: number
Returns void
-
Optional scoresCallbackIntervalMs: number
Returns void
unsubscribe
- unsubscribe(callback: (activeSpeakers: string[]) => void): void
-
Parameters
-
callback: (activeSpeakers: string[]) => void
-
- (activeSpeakers: string[]): void
Returns void
ActiveSpeakerDetector listens to the volume indicator updates from the RealtimeController. It consults the ActiveSpeakerPolicy to determine if the speaker is active or not.