export { FluidVad, VadOptions, VadEvent, Segment } from "./dist/fluidvad.js"; /** * User-facing configuration; all fields optional, defaults match Silero. * Out-of-range values (NaN, negatives, thresholds outside [0, 1]) make the * FluidVad constructor throw. */ export interface VadConfig { /** Entry threshold: a frame is speech at probability ≥ this (default 0.5). */ threshold?: number; /** * Minimum speech run to emit, seconds (default 0.15). Shorter blips * (coughs, clicks) are suppressed; streaming SpeechStart fires once speech * has persisted this long, backdated to the true start. Set 0 for * immediate (per-frame) starts. */ minSpeechDuration?: number; /** Silence needed to close speech, seconds (default 0.75). */ minSilenceDuration?: number; /** * Split speech runs longer than this, seconds (default 14) — bounds * utterance buffering during long monologues. `Infinity` disables. */ maxSpeechDuration?: number; /** Padding added around each segment / boundary event, seconds (default 0.1). */ speechPadding?: number; /** * Pin the exit threshold of the hysteresis (default: threshold − 0.15). * Only affects when speech *ends*; the entry threshold stays `threshold`. * Must not exceed `threshold`. */ negativeThreshold?: number; } export interface LoadOptions { /** * Explicit wasm source (bytes, Response, URL, or compiled Module), * bypassing environment detection — the escape hatch for Electron * renderers with contextIsolation and for unusual bundlers. */ wasm?: BufferSource | WebAssembly.Module | Response | URL | Promise; } /** Initialize the wasm module once. Safe to call multiple times (first call wins). */ export function load(options?: LoadOptions): Promise; /** Load the wasm and construct a FluidVad in one call. */ export function createVad( options?: VadConfig, loadOptions?: LoadOptions ): Promise;