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

TTSAlignment.md

61 lines980 Bytes

1---
2id: TTSAlignment
3title: TTSAlignment
4---
5​
6Defined in: packages/ai/src/types.ts:2850
7​
8Timings for the generated audio, returned when `timestamps: true` was
9requested and the adapter declares `capabilities.timestamps`.
10​
11Granularity differs per provider — ElevenLabs reports characters, BytePlus
12reports words — so `unit` says which, and the three arrays are parallel.
13All times are **seconds**; adapters convert.
14​
15## Properties
16​
17### endSeconds
18​
19```ts
20endSeconds: number[];
21```
22​
23Defined in: packages/ai/src/types.ts:2858
24​
25End of each entry in seconds. Same length as `texts`.
26​
27***
28​
29### startSeconds
30​
31```ts
32startSeconds: number[];
33```
34​
35Defined in: packages/ai/src/types.ts:2856
36​
37Start of each entry in seconds. Same length as `texts`.
38​
39***
40​
41### texts
42​
43```ts
44texts: string[];
45```
46​
47Defined in: packages/ai/src/types.ts:2854
48​
49Entry text, in audio order.
50​
51***
52​
53### unit
54​
55```ts
56unit: "character" | "word";
57```
58​
59Defined in: packages/ai/src/types.ts:2852
60​
61Granularity of each entry.