Defined in: packages/ai/src/types.ts:2707
Options for text-to-speech generation. These are the common options supported across providers.
TProviderOptions extends object = object
optional abortSignal?: AbortSignal;Defined in: packages/ai/src/types.ts:2747
Effective abort signal composed by the activity from caller abortSignal and/or timeout. Adapters should forward this to the provider SDK when supported. Request-specific — never store on a global client config.
optional format?: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";Defined in: packages/ai/src/types.ts:2731
The output audio format
logger: InternalLogger;Defined in: packages/ai/src/types.ts:2741
Internal logger threaded from the generateSpeech() entry point. Adapters must call logger.request() before the SDK call and logger.errors() in catch blocks.
model: string;Defined in: packages/ai/src/types.ts:2709
The model to use for TTS generation
optional modelOptions?: TProviderOptions;Defined in: packages/ai/src/types.ts:2735
Model-specific options for TTS generation
optional speed?: number;Defined in: packages/ai/src/types.ts:2733
The speed of the generated audio (0.25 to 4.0)
text: string;Defined in: packages/ai/src/types.ts:2715
The text to convert to speech. When the caller passed turns, the activity fills this with the turn texts joined by newlines so adapters that only read text still receive the full script.
optional timestamps?: boolean;Defined in: packages/ai/src/types.ts:2727
Ask for alignment / segments on the result. Rejected by the activity unless the adapter declares capabilities.timestamps, because on some providers this is a different endpoint rather than free metadata.
optional turns?: TTSTurn[];Defined in: packages/ai/src/types.ts:2721
Multi-voice dialogue turns, when the caller asked for dialogue. Only adapters that declare capabilities.maxSpeakers ever see this — the activity rejects turns for the rest.
optional voice?: string;Defined in: packages/ai/src/types.ts:2729
The voice to use for generation