import { TTS } from '../../agents/providers.js'; import type { CartesiaTTSModel } from './models.js'; declare class GenerationConfigImpl { static readonly displayName = "GenerationConfig"; speed: number | null; emotion: string | null; volume: number | null; pronunciationDictId: string | null; maxBufferDelayMs: number | null; enableWordTimestamps: boolean; constructor(opts?: { speed?: number | null; emotion?: string | null; volume?: number | null; pronunciationDictId?: string | null; maxBufferDelayMs?: number | null; enableWordTimestamps?: boolean; }); } export type GenerationConfig = GenerationConfigImpl; /** * Grouped generation settings for {@link CartesiaTTS}. Flat options on * `CartesiaTTSOptions` take precedence over the matching field here. * * @param opts.speed Speaking speed. Default: `null`. * @param opts.emotion Emotion tag to apply. Default: `null`. * @param opts.volume Output volume. Default: `null`. * @param opts.pronunciationDictId Pronunciation dictionary ID. Default: `null`. * @param opts.maxBufferDelayMs Max buffering delay in ms. Default: `null`. * @param opts.enableWordTimestamps Emit per-word timestamps. Default: `false`. */ export declare const GenerationConfig: (opts?: { speed?: number | null; emotion?: string | null; volume?: number | null; pronunciationDictId?: string | null; maxBufferDelayMs?: number | null; enableWordTimestamps?: boolean; }) => GenerationConfig; /** Configuration options for the {@link CartesiaTTS} provider. */ export type CartesiaTTSOptions = { /** Cartesia API key. Falls back to the `CARTESIA_API_KEY` env var. */ apiKey?: string; /** Voice as a catalog UUID (string) or a cloning embedding (non-empty number array). Default: a built-in voice UUID. */ voice?: string | number[] | null; /** Alias for `voice`; used when `voice` is not set. */ voiceId?: string | number[] | null; /** Synthesis model. Default: `'sonic-2'`. */ model?: CartesiaTTSModel | string; /** Synthesis language code. Default: `'en'`. */ language?: string; /** Output audio sample rate in Hz. Default: `24000`. (The effective rate is fixed; other values are ignored.) */ sampleRate?: number; /** Speaking speed. Default: `null` (or `generationConfig.speed`). */ speed?: number | null; /** Output volume. Default: `null` (or `generationConfig.volume`). */ volume?: number | null; /** Emotion tag. Default: `null` (or `generationConfig.emotion`). */ emotion?: string | null; /** Pronunciation dictionary ID. Default: `null` (or `generationConfig.pronunciationDictId`). */ pronunciationDictId?: string | null; /** Max buffering delay in ms. Default: `null` (or `generationConfig.maxBufferDelayMs`). */ maxBufferDelayMs?: number | null; /** Emit per-word timestamps. Default: `false` (or `generationConfig.enableWordTimestamps`). */ enableWordTimestamps?: boolean | null; /** Grouped generation settings; flat options above take precedence. Default: `null`. */ generationConfig?: GenerationConfig | null; [key: string]: any; }; declare class CartesiaTTSImpl extends TTS { static readonly displayName = "CartesiaTTS"; _providerName: string; apiKey?: string; voiceId: string; voice: string; voiceEmbedding: number[] | null; model: string; language: string; speed: number | null; volume: number | null; emotion: string | null; pronunciationDictId: string | null; maxBufferDelayMs: number | null; enableWordTimestamps: boolean; constructor(opts?: CartesiaTTSOptions); getRuntimeConfig(): Record; } export type CartesiaTTS = CartesiaTTSImpl; /** * Cartesia text-to-speech provider. * * Creates a configured Cartesia TTS provider for use in a voice agent. */ export declare const CartesiaTTS: (opts?: CartesiaTTSOptions) => CartesiaTTS; export {};