import { VADType } from '../types'; /** * VAD configuration and callbacks */ export interface VADConfig { /** * VAD type to use (default: "silero") * - "silero": ML-based VAD using Silero model (most accurate, requires model download) * - "simple": Energy-based VAD algorithm (fast, no download, good accuracy) * - "none": Disable client-side VAD (rely only on server-side VAD) */ vadType?: VADType; /** * Called when speech is detected */ onSpeechStart?: () => void; /** * Called when speech ends */ onSpeechEnd?: () => void; /** * Called when VAD is ready to use */ onVADReady?: () => void; /** * Called when VAD encounters an error */ onVADError?: (error: Error) => void; /** * Minimum duration of silence (in frames) before speech is considered ended * Default: 8 frames (~800ms at 10fps frame rate) */ redemptionFrames?: number; /** * Threshold for positive speech detection (0-1) * Higher = more conservative (fewer false positives) * Default: 0.5 */ positiveSpeechThreshold?: number; /** * Threshold for negative speech detection (0-1) * Lower = more conservative (fewer false negatives) * Default: 0.35 */ negativeSpeechThreshold?: number; } /** * VAD Manager class * Manages client-side voice activity detection with support for multiple VAD types */ export declare class VADManager { private vad; private simpleVad; private config; private isActive; private isSpeaking; private vadType; constructor(config: VADConfig); /** * Start VAD with the provided media stream * @param stream MediaStream from microphone - REUSE existing stream to avoid duplicate permissions */ start(stream: MediaStream): Promise; /** * Stop VAD and cleanup resources */ stop(): Promise; /** * Check if user is currently speaking */ isSpeakingNow(): boolean; /** * Check if VAD is initialized and active */ isInitialized(): boolean; /** * Pause VAD (temporarily stop processing) */ pause(): void; /** * Resume VAD (restart processing) */ resume(): void; } //# sourceMappingURL=VADManager.d.ts.map