Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

TTSOptions.md

89 lines1.6 KB

1---
2id: TTSOptions
3title: TTSOptions
4---
5​
6# Interface: TTSOptions\<TProviderOptions\>
7​
8Defined in: [types.ts:891](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L891)
9​
10Options for text-to-speech generation.
11These are the common options supported across providers.
12​
13## Type Parameters
14​
15### TProviderOptions
16​
17`TProviderOptions` *extends* `object` = `object`
18​
19## Properties
20​
21### format?
22​
23```ts
24optional format: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
25```
26​
27Defined in: [types.ts:899](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L899)
28​
29The output audio format
30​
31***
32​
33### model
34​
35```ts
36model: string;
37```
38​
39Defined in: [types.ts:893](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L893)
40​
41The model to use for TTS generation
42​
43***
44​
45### modelOptions?
46​
47```ts
48optional modelOptions: TProviderOptions;
49```
50​
51Defined in: [types.ts:903](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L903)
52​
53Model-specific options for TTS generation
54​
55***
56​
57### speed?
58​
59```ts
60optional speed: number;
61```
62​
63Defined in: [types.ts:901](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L901)
64​
65The speed of the generated audio (0.25 to 4.0)
66​
67***
68​
69### text
70​
71```ts
72text: string;
73```
74​
75Defined in: [types.ts:895](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L895)
76​
77The text to convert to speech
78​
79***
80​
81### voice?
82​
83```ts
84optional voice: string;
85```
86​
87Defined in: [types.ts:897](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L897)
88​
89The voice to use for generation