@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
22 lines (21 loc) • 1.23 kB
TypeScript
import type { STTDictionaryEntry, STTResult, TranscribeDeps, TranscribeStreamEvent, TranscribeStreamOptions } from "../types/index.js";
/** Float samples in [-1, 1] → 16 kHz mono PCM16 WAV. */
export declare function encodeWav16k(pcm: Float32Array): Buffer;
/**
* Engine options for one provider: the caller's pass-through `STTOptions`,
* dictionary terms as vocabulary and appended to the prompt, `"auto"`
* language left to the engine.
*/
/** The words an engine is prompted with (dictionary terms, the caller's vocabulary, the fixed phrasing). */
export declare function promptTermsOf(options: {
dictionary?: STTDictionaryEntry[];
vocabulary?: string[];
}): string[];
/**
* Engine output through the guards: a looping phrase is collapsed and the
* share of words it took is recorded on `metadata.loopShare`; an output
* that is only the prompt echoed back becomes empty. `note` receives a
* human-readable line for each guard that fired.
*/
export declare function guardEngineResult(res: STTResult, promptTerms: readonly string[], note: (line: string) => void): STTResult;
export declare function runTranscribeStream(options: TranscribeStreamOptions, deps: TranscribeDeps): AsyncIterable<TranscribeStreamEvent>;