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

30 lines (29 loc) • 1.51 kB
/** * `transcribe` — the fourth inference type, next to `generate`, `stream` and * `decide`. Turns audio into text through any registered STT handler, with the * optional layers that make self-hosted engines usable in production: * * - a dictionary of names and jargon, sent to the engine as context and used * to repair mis-hearings after the fact; * - a decision-model guard (`tryDecide`) that asks, per dictionary candidate, * whether the speaker meant the term or the literal word, so a name never * rewrites the ordinary word it sounds like; fails open like every other * `decide` consumer; * - an LLM rewrite (`generate`/`stream`) that fixes spelling and punctuation * and writes Indic-script words in Latin letters the way people type * (Hinglish, Tanglish …) without ever translating them; * - a second-opinion engine whose text the rewrite reconciles with the * primary one, and a fallback engine for utterances the primary cannot read * (an Indic model on English speech reports a low language score, or * nothing at all); * - client-side streaming for batch engines: a chunked adapter with an energy * gate, rolling re-transcription and LocalAgreement commits. * * Nothing in these layers may lose words: a rewrite that drops more than * `maxDropRatio` of them is discarded, a timed-out guard applies the dictionary * as is, and a final pass that returns less than the live text keeps the live * text. * * @module types/transcribe */ export {};