@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
20 lines (19 loc) • 942 B
TypeScript
import type { STTChunkedRun, STTChunkedStreamOptions, TranscribeStreamEvent } from "../../types/index.js";
/** Minimal unbounded async queue: the producer never waits for the consumer. */
export declare class StreamEventQueue<T> {
private readonly items;
private waiter;
private closed;
push(item: T): void;
close(): void;
drain(): AsyncGenerator<T>;
private wake;
}
/**
* Streams a batch STT engine: `frames` are PCM16LE mono at
* `options.sampleRate` (default 16000); `run` transcribes one utterance at
* 16 kHz. Yields `interim`, `language`, `final`, `silence` and `error`
* events; utterance numbers are in order but may skip (a dropped cough
* consumes one). Ends after the source ends and every final is emitted.
*/
export declare function chunkedTranscribeStream(frames: AsyncIterable<Buffer | Uint8Array>, run: STTChunkedRun, options?: STTChunkedStreamOptions): AsyncIterable<TranscribeStreamEvent>;