export type onTalkingHandler = (isTalking: boolean) => void;
export type onSilenceHandler = () => void;
export interface TrawTalkingDetectorOptions {
    audioContext: AudioContext;
    mediaStream?: MediaStream;
    /**
     * Triggered when the user starts & stops talking
     */
    onTalking?: onTalkingHandler;
    /**
     * Trigger onSilence callback when the silence duration is longer than this value in milliseconds
     *
     * @default 1500
     */
    silenceTimeout?: number;
    onSilence?: onSilenceHandler;
}
export declare class TrawTalkingDetector {
    private _audioContext;
    private _mediaStream?;
    private _audioDetection?;
    private _silenceTimeoutMilliseconds;
    private _silenceTimeoutId?;
    onTalking?: onTalkingHandler;
    onSilence?: onSilenceHandler;
    constructor({ audioContext, mediaStream, onTalking, silenceTimeout, onSilence }: TrawTalkingDetectorOptions);
    updateMediaStream(mediaStream: MediaStream | undefined): void;
    updateAudioContext(audioContext: AudioContext): void;
    /**
     * Callback for speech start event
     */
    onSpeechStart: () => void;
    /**
     * Callback for speech end event
     */
    onSpeechEnd: () => void;
    private initAudioDetection;
}
//# sourceMappingURL=TrawTalkingDetector.d.ts.map