@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
32 lines (31 loc) • 1.21 kB
TypeScript
/**
* Cartesia TTS Handler (synchronous /tts/bytes endpoint)
*
* Implements the standard `TTSHandler` synchronous-request contract on top
* of Cartesia's REST `/tts/bytes` endpoint. The pre-existing
* `adapters/tts/cartesiaHandler.ts` (`CartesiaStream`) targets the
* realtime WebSocket flow used by the voice server and does NOT implement
* `TTSHandler`; this file fills the gap so `nl.generate({ tts: { provider:
* "cartesia" } })` works through the same `TTSProcessor` dispatch as
* every other shipped TTS provider.
*
* @module voice/providers/CartesiaTTS
* @see https://docs.cartesia.ai/api-reference/tts/bytes
*/
import type { TTSHandler, TTSOptions, TTSResult } from "../../types/index.js";
/**
* Cartesia synchronous TTS handler.
*
* Auth: `X-API-Key: ${CARTESIA_API_KEY}` + `Cartesia-Version` header.
*/
export declare class CartesiaTTS implements TTSHandler {
readonly maxTextLength = 5000;
private readonly apiKey;
private readonly baseUrl;
private readonly apiVersion;
constructor(apiKey?: string);
isConfigured(): boolean;
synthesize(text: string, options?: TTSOptions): Promise<TTSResult>;
private mapOutputFormat;
private effectiveFormat;
}