/// <reference types="node" />
import { EventEmitter } from 'events';
import Participant from '../internal/participant';
import SpeakerDetection from './speaker-detection';
type SubscriberAudioLevels = Record<string, number>;
export type ActiveSpeakerInfo = {
    subscriberId: string | undefined;
    movingAvg: number;
    participant: Participant | undefined;
};
type ParticipantBySubscriberId = {
    [key: string]: Participant;
};
type ActiveSpeakerChangedPayload = {
    previousActiveSpeaker: ActiveSpeakerInfo;
    newActiveSpeaker: ActiveSpeakerInfo;
};
type SpeakerChangeDetected = {
    isSpeaking: boolean;
};
declare interface ActiveSpeakerTracker {
    emit(event: 'activeSpeakerStatusChanged', payload: SpeakerChangeDetected): boolean;
    on(event: 'activeSpeakerStatusChanged', listener: (payload: SpeakerChangeDetected) => void): this;
    emit(event: 'activeSpeakerChanged', payload: ActiveSpeakerChangedPayload): boolean;
    on(event: 'activeSpeakerChanged', listener: (payload: ActiveSpeakerChangedPayload) => void): this;
}
declare class ActiveSpeakerTracker extends EventEmitter {
    _subscriberAudioLevelsBySubscriberId: SubscriberAudioLevels;
    _participantsBySubscriberId: ParticipantBySubscriberId;
    activeSpeaker: ActiveSpeakerInfo;
    speakerDetection: SpeakerDetection;
    calculateActiveSpeaker: () => void;
    constructor();
    onCameraSubscriberDestroyed: (subscriberId: string) => void;
    onSubscriberAudioLevelUpdated: ({ subscriberId, movingAvg, participant, audioLevel, }: {
        subscriberId: string;
        movingAvg: number;
        participant: Participant;
        audioLevel: number;
    }) => void;
    _calculateActiveSpeaker: () => void;
}
export default ActiveSpeakerTracker;
