export type VoiceRecorderMimeType = 'audio/webm' | 'audio/mp4';
export type onFileCreatedHandler = (file: File, ext: string) => void;
export interface TrawVoiceRecorderOptions {
    audioBitsPerSecond?: number;
    mediaStream?: MediaStream;
    onFileCreated?: onFileCreatedHandler;
}
export declare class TrawVoiceRecorder {
    readonly audioBitsPerSecond: number;
    readonly mimeType: VoiceRecorderMimeType;
    private _mediaStream?;
    private _mediaRecorder?;
    /**
     * Callback function when a voice file is created
     */
    onFileCreated?: (file: File, ext: string) => void;
    constructor({ mediaStream, audioBitsPerSecond, onFileCreated }: TrawVoiceRecorderOptions);
    static isSupported: () => boolean;
    /**
     * When the media stream is changed, reinitialize the media recorder
     * @param mediaStream
     */
    updateMediaStream: (mediaStream: MediaStream | undefined) => void;
    /**
     * Check if it's ready to start recording
     */
    get isReady(): boolean;
    /**
     * Check if it's recording
     */
    get isRecording(): boolean;
    /**
     * Start voice recorder
     */
    startVoiceRecorder: () => void;
    /**
     * Stop voice recorder
     */
    stopVoiceRecorder: () => void;
    /**
     * Split voice chunk
     *
     * onFileCreated will be called when the chunk is ready
     */
    splitVoiceChunk: () => void;
    private static getSupportedMimeType;
    private onDataAvailable;
    /**
     * Initialize media recorder
     * @private
     */
    private initMediaRecorder;
}
//# sourceMappingURL=TrawVoiceRecorder.d.ts.map