/**
 * Voice Activity Detection (VAD)
 *
 * Detects speech in audio stream to enable automatic speech recognition
 * start/stop and improve transcription accuracy.
 */
import { EventEmitter } from 'events';
import type { VADConfig, VADEvent } from './types.js';
/**
 * VAD detector interface
 */
export interface IVADDetector {
    /** Process audio frame */
    processFrame(frame: Buffer): VADEvent | null;
    /** Reset state */
    reset(): void;
    /** Check if speech is active */
    isSpeechActive(): boolean;
    /** Get configuration */
    getConfig(): VADConfig;
    /** Update configuration */
    updateConfig(config: Partial<VADConfig>): void;
}
/**
 * Voice Activity Detector
 *
 * Uses energy-based detection with adaptive thresholding.
 * A production implementation would use WebRTC VAD or Silero VAD.
 */
export declare class VoiceActivityDetector extends EventEmitter implements IVADDetector {
    private config;
    private speechActive;
    private speechStartTime;
    private silenceStartTime;
    private frameCount;
    private energyHistory;
    private noiseFloor;
    private speechThreshold;
    constructor(config?: Partial<VADConfig>);
    processFrame(frame: Buffer): VADEvent | null;
    /**
     * Calculate energy of audio frame
     */
    private calculateEnergy;
    /**
     * Update energy history for adaptive thresholding
     */
    private updateEnergyHistory;
    /**
     * Calculate speech probability based on energy
     */
    private calculateSpeechProbability;
    reset(): void;
    isSpeechActive(): boolean;
    getConfig(): VADConfig;
    updateConfig(config: Partial<VADConfig>): void;
    /**
     * Get current noise floor
     */
    getNoiseFloor(): number;
    /**
     * Get current speech threshold
     */
    getSpeechThreshold(): number;
    /**
     * Get current energy level
     */
    getCurrentEnergy(): number;
    /**
     * Get speech duration
     */
    getSpeechDuration(): number;
}
/**
 * Factory function for creating VAD detector
 */
export declare function createVADDetector(config?: Partial<VADConfig>): VoiceActivityDetector;
export default VoiceActivityDetector;
