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

16 lines (15 loc) • 601 B
import type { TTSChunk, TTSMetadata, TTSOptions, TTSResult } from "../types/index.js"; /** * Preserve source-stream backpressure while interleaving incremental TTS audio. * Source chunks are yielded before their derived audio, and TTS failures degrade * to the unchanged source stream. */ export declare function interleaveTTSStream<T>(params: { stream: AsyncIterable<T>; provider: string; options: TTSOptions; onComplete?: (result: TTSResult | undefined, error?: NonNullable<TTSMetadata["error"]>) => void; }): AsyncGenerator<T | { type: "tts_audio"; audio: TTSChunk; }>;