import { VADAdapter, VADConfig, VADState, VADFactory, VADMetadata, VADEventEmitter } from '../'; /** * Simple VAD Adapter Configuration */ export interface SimpleVADConfig extends VADConfig { /** Energy threshold for speech detection (0-1, default: 0.15) */ energyThreshold?: number; /** Minimum duration of silence (in frames) before speech is considered ended (default: 8) */ redemptionFrames?: number; } /** * Simple VAD Adapter * * Energy-based voice activity detection using RMS analysis. * Fast, lightweight, requires no model downloads, but less accurate than ML-based VADs. * * This adapter is designed to run alongside Silero VAD as a redundant check. * If Simple VAD doesn't detect speech for an extended period while Silero VAD * is still detecting speech, it can signal that Silero VAD should be paused/cancelled. */ export declare class SimpleVADAdapter extends VADEventEmitter implements VADAdapter { readonly id = "simple-vad"; readonly name = "Simple VAD (Energy-based)"; readonly version = "1.0.0"; private config; private state; private initialized; private isSpeakingFlag; private silenceFrames; private lastSpeechFrameTime; constructor(config?: Partial); /** * Initialize the Simple VAD adapter * * Note: Simple VAD requires no initialization - it's ready immediately */ initialize(): Promise; /** * Process audio frame using energy-based detection * * @param frame - Audio frame as Float32Array (typically 16kHz mono) * @param timestamp - Frame timestamp in milliseconds * @returns Speech probability (0.0 to 1.0) or null if not ready */ processFrame(frame: Float32Array, timestamp: number): number | null; /** * Calculate RMS (Root Mean Square) energy from audio samples * * @param samples - Audio samples as Float32Array * @returns RMS energy value */ private calculateRMS; configure(config: VADConfig): void; reset(): void; dispose(): void; isReady(): boolean; getState(): VADState; /** * Check if currently detecting speech */ isSpeaking(): boolean; /** * Get time since last speech detection (in milliseconds) * Returns 0 if currently speaking */ getTimeSinceLastSpeech(currentTimestamp: number): number; } /** * Simple VAD Factory */ export declare class SimpleVADFactory implements VADFactory { create(config?: Partial): SimpleVADAdapter; getMetadata(): VADMetadata; } /** * Register Simple VAD adapter with VAD Registry * * This function ensures the SimpleVADAdapter is registered. * The adapter auto-registers when the module is imported, but this function * can be called explicitly to ensure registration. * * @returns void */ export declare function registerSimpleVADAdapter(): void; //# sourceMappingURL=SimpleVADAdapter.d.ts.map