/** * 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; private mapOutputFormat; private effectiveFormat; }