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

TranscriptionOptions.md

112 lines1.7 KB

1---
2id: TranscriptionOptions
3title: TranscriptionOptions
4---
5​
6Defined in: packages/ai/src/types.ts:3140
7​
8## Type Parameters
9​
10### TProviderOptions
11​
12`TProviderOptions` *extends* `object` = `object`
13​
14## Properties
15​
16### abortSignal?
17​
18```ts
19optional abortSignal?: AbortSignal;
20```
21​
22Defined in: packages/ai/src/types.ts:3166
23​
24Effective abort signal composed by the activity from caller `abortSignal`
25and/or `timeout`. Adapters should forward this to the provider SDK when
26supported. Request-specific — never store on a global client config.
27​
28***
29​
30### audio
31​
32```ts
33audio: string | ArrayBuffer | File | Blob;
34```
35​
36Defined in: packages/ai/src/types.ts:3146
37​
38The audio data to transcribe - can be base64 string, File, Blob, or Buffer
39​
40***
41​
42### language?
43​
44```ts
45optional language?: string;
46```
47​
48Defined in: packages/ai/src/types.ts:3148
49​
50The language of the audio in ISO-639-1 format (e.g., 'en')
51​
52***
53​
54### logger
55​
56```ts
57logger: InternalLogger;
58```
59​
60Defined in: packages/ai/src/types.ts:3160
61​
62Internal logger threaded from the generateTranscription() entry point.
63Adapters must call logger.request() before the SDK call and logger.errors()
64in catch blocks.
65​
66***
67​
68### model
69​
70```ts
71model: string;
72```
73​
74Defined in: packages/ai/src/types.ts:3144
75​
76The model to use for transcription
77​
78***
79​
80### modelOptions?
81​
82```ts
83optional modelOptions?: TProviderOptions;
84```
85​
86Defined in: packages/ai/src/types.ts:3154
87​
88Model-specific options for transcription
89​
90***
91​
92### prompt?
93​
94```ts
95optional prompt?: string;
96```
97​
98Defined in: packages/ai/src/types.ts:3150
99​
100An optional prompt to guide the transcription
101​
102***
103​
104### responseFormat?
105​
106```ts
107optional responseFormat?: TranscriptionResponseFormat;
108```
109​
110Defined in: packages/ai/src/types.ts:3152
111​
112The format of the transcription output