/** * AudioVad — voice-activity detection via the server's /v1/audio/vad route. * * The browser SDK is server-route-only; there is no local C-ABI native * execution. This facade POSTs PCM-f32 audio bytes (as base64) to the * hosted native backend and returns typed VAD transition events. * * Python reference: octomil-python/octomil/audio/vad.py * Route: POST /v1/audio/vad (octomil-python/octomil/serve/app.py:1423) * * Request body: * { audio_pcm_f32_base64: string, sample_rate_hz: number, deadline_ms?: number } * * Response body: * { object: "audio.vad", model: string, sample_rate_hz: number, * transitions: VadTransition[] } */ /** A single voice-activity transition event. */ export interface VadTransition { /** "speech_start" | "speech_end" — mirrors the native VadTransition.kind. */ kind: string; /** Milliseconds from the start of the audio clip. */ timestampMs: number; /** Detection confidence in [0, 1]. */ confidence: number; } export interface VadDetectRequest { /** * Raw mono PCM-f32 audio as ArrayBuffer / Uint8Array. * The bytes must be float32-LE (matching the native backend expectation). */ audioBytes: ArrayBuffer | Uint8Array; /** Sample rate of the audio, in Hz (e.g. 16000). */ sampleRateHz: number; /** Per-request deadline in milliseconds. Defaults to 300 000 server-side. */ deadlineMs?: number; } export interface VadDetectResponse { readonly object: "audio.vad"; readonly model: string; readonly sampleRateHz: number; readonly transitions: VadTransition[]; } export declare class AudioVad { private readonly serverUrl; private readonly apiKey; constructor(serverUrl: string, apiKey: string); /** * Detect voice activity in the provided PCM-f32 audio clip. * * Sends the audio to the server's /v1/audio/vad endpoint (backed by * the native silero-VAD runtime). Returns the sequence of speech-start / * speech-end transitions found in the clip. */ detect(request: VadDetectRequest): Promise; } //# sourceMappingURL=audio-vad.d.ts.map