Open History to see the last commit
1---
2id: TTSResult
3title: TTSResult
4---
5
6Defined in: packages/ai/src/types.ts:2928
7
8Result of text-to-speech generation.
9
10## Properties
11
12### alignment?
13
14```ts
15optional alignment?: TTSAlignment;
16```
17
18Defined in: packages/ai/src/types.ts:2943
19
20Character- or word-level timings, present when `timestamps: true` was
21requested. Use this rather than `duration` to find where *speech* ends.
22
23***
24
25### artifacts?
26
27```ts
28optional artifacts?: PersistedArtifactRef[];
29```
30
31Defined in: packages/ai/src/types.ts:2954
32
33Persisted artifact references for generated assets, when available
34
35***
36
37### audio
38
39```ts
40audio: string;
41```
42
43Defined in: packages/ai/src/types.ts:2934
44
45Base64-encoded audio data
46
47***
48
49### contentType?
50
51```ts
52optional contentType?: string;
53```
54
55Defined in: packages/ai/src/types.ts:2950
56
57Content type of the audio (e.g., 'audio/mp3')
58
59***
60
61### duration?
62
63```ts
64optional duration?: number;
65```
66
67Defined in: packages/ai/src/types.ts:2938
68
69Duration of the audio file in seconds, if available
70
71***
72
73### format
74
75```ts
76format: string;
77```
78
79Defined in: packages/ai/src/types.ts:2936
80
81Audio format of the generated audio
82
83***
84
85### id
86
87```ts
88id: string;
89```
90
91Defined in: packages/ai/src/types.ts:2930
92
93Unique identifier for the generation
94
95***
96
97### model
98
99```ts
100model: string;
101```
102
103Defined in: packages/ai/src/types.ts:2932
104
105Model used for generation
106
107***
108
109### segments?
110
111```ts
112optional segments?: TTSSegment[];
113```
114
115Defined in: packages/ai/src/types.ts:2948
116
117Per-turn (or per-utterance) spans of the audio, present when
118`timestamps: true` was requested and the provider reports segmentation.
119
120***
121
122### usage?
123
124```ts
125optional usage?: TokenUsage<ProviderUsageDetails>;
126```
127
128Defined in: packages/ai/src/types.ts:2952
129
130Token usage information (if provided by the adapter)