export declare enum RecorderEvents {
    Start = "start",
    Stop = "stop",
    Data = "data",
    Level = "level",
    Error = "error"
}
type RecorderHandlerMap = {
    [RecorderEvents.Start]: () => void;
    [RecorderEvents.Stop]: () => void;
    [RecorderEvents.Data]: (data: Blob) => void;
    [RecorderEvents.Level]: (levels: number[]) => void;
    [RecorderEvents.Error]: (error: Error) => void;
};
export declare class Recorder {
    private audioContext?;
    private mediaStream?;
    private mediaStreamSource?;
    private analyserNode?;
    private recorderProcessorNode?;
    private silentGainNode?;
    private meterFrameId?;
    private isRecording;
    private setupPromise;
    private listeners;
    initialized: boolean;
    on<K extends RecorderEvents>(event: K, handler: RecorderHandlerMap[K]): () => void;
    private emit;
    clearListeners(): void;
    init(stream: MediaStream): Promise<void>;
    ensureAudioGraph(): Promise<void>;
    private setupAudioGraph;
    private attachStream;
    detachStream(options?: {
        stopTracks?: boolean;
    }): void;
    startRecording(): Promise<void>;
    stopRecording(): void;
    dispose(): void;
    get isRecordingStatus(): boolean;
    private startMetering;
    private stopMetering;
}
export {};
