Docs
CodeRabbit
Cloudflare
Railway
SerpAPI
Clerk
AG Grid
WorkOS
Netlify
OpenRouter
Prisma
Unkey
Electric
Sentry
CodeRabbit
Cloudflare
Railway
SerpAPI
Clerk
AG Grid
WorkOS
Netlify
OpenRouter
Prisma
Unkey
Electric
Sentry
Class References
Function References
Interface References
Type Alias References
Variable References

TTSOptions

Interface: TTSOptions<TProviderOptions>

Defined in: packages/ai/src/types.ts:1669

Options for text-to-speech generation. These are the common options supported across providers.

Type Parameters

TProviderOptions

TProviderOptions extends object = object

Properties

format?

ts
optional format: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
optional format: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";

Defined in: packages/ai/src/types.ts:1677

The output audio format


logger

ts
logger: InternalLogger;
logger: InternalLogger;

Defined in: packages/ai/src/types.ts:1687

Internal logger threaded from the generateSpeech() entry point. Adapters must call logger.request() before the SDK call and logger.errors() in catch blocks.


model

ts
model: string;
model: string;

Defined in: packages/ai/src/types.ts:1671

The model to use for TTS generation


modelOptions?

ts
optional modelOptions: TProviderOptions;
optional modelOptions: TProviderOptions;

Defined in: packages/ai/src/types.ts:1681

Model-specific options for TTS generation


speed?

ts
optional speed: number;
optional speed: number;

Defined in: packages/ai/src/types.ts:1679

The speed of the generated audio (0.25 to 4.0)


text

ts
text: string;
text: string;

Defined in: packages/ai/src/types.ts:1673

The text to convert to speech


voice?

ts
optional voice: string;
optional voice: string;

Defined in: packages/ai/src/types.ts:1675

The voice to use for generation