UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

37 lines (36 loc) • 1.77 kB
/** * The Silero VAD model file: the pinned revision, where it lives and the * first-use download. The same rules as Whistle's assets, for one file * instead of three: an explicit directory, then `NEUROLINK_VAD_DIR`, then * `NEUROLINK_MODEL_DIR/silero-vad`, then the copy shipped with the package * (`models/silero-vad`), then `~/.neurolink/models/silero-vad`, the only * directory a download ever writes to. * * Upstream: `snakers4/silero-vad`, MIT. * * @module voice/vad/assets */ import type { LocalModelAsset, STTVadOptions } from "../../types/index.js"; /** The pinned model: Silero VAD v6.2, 2.3 MB, 8 and 16 kHz. */ export declare const SILERO_VAD_ASSET: LocalModelAsset; /** * Where the model lives: `options.modelDir` → `NEUROLINK_VAD_DIR` → * `NEUROLINK_MODEL_DIR/silero-vad` → the copy shipped with the package → * `~/.neurolink/models/silero-vad`. */ export declare function resolveVadDir(options?: STTVadOptions): string; /** * Whether a missing model may be fetched: on unless `options.autoDownload` * is `false` or `NEUROLINK_VAD_AUTO_DOWNLOAD` is `0` / `false` / `off` / `no`. */ export declare function vadAutoDownloadEnabled(options?: STTVadOptions): boolean; /** Cheap presence check (no hashing). */ export declare function vadModelPresent(dir: string): boolean; /** * Makes sure the model is in `dir` and matches its pinned hash, downloading * it when missing and allowed. Resolves to the model's path. Concurrent * calls for the same directory share one preparation. */ export declare function ensureVadModel(dir: string, autoDownload: boolean): Promise<string>; /** The "here is exactly what to put where" body of every "unusable" message. */ export declare function describeVadModel(dir: string, reason: string): string;