Open History to see the last commit
1---
2id: AudioGenerationOptions
3title: AudioGenerationOptions
4---
5
6Defined in: [packages/ai/src/types.ts:2556](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L2556)
7
8Options for audio generation (music, sound effects, etc.).
9These are the common options supported across providers.
10
11## Type Parameters
12
13### TProviderOptions
14
15`TProviderOptions` *extends* `object` = `object`
16
17## Properties
18
19### abortSignal?
20
21```ts
22optional abortSignal?: AbortSignal;
23```
24
25Defined in: [packages/ai/src/types.ts:2578](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L2578)
26
27Effective abort signal composed by the activity from caller `abortSignal`
28and/or `timeout`. Adapters should forward this to the provider SDK when
29supported. Request-specific — never store on a global client config.
30
31***
32
33### duration?
34
35```ts
36optional duration?: number;
37```
38
39Defined in: [packages/ai/src/types.ts:2564](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L2564)
40
41Desired duration in seconds
42
43***
44
45### logger
46
47```ts
48logger: InternalLogger;
49```
50
51Defined in: [packages/ai/src/types.ts:2572](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L2572)
52
53Internal logger threaded from the generateAudio() entry point. Adapters
54must call logger.request() before the SDK call and logger.errors() in
55catch blocks.
56
57***
58
59### model
60
61```ts
62model: string;
63```
64
65Defined in: [packages/ai/src/types.ts:2560](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L2560)
66
67The model to use for audio generation
68
69***
70
71### modelOptions?
72
73```ts
74optional modelOptions?: TProviderOptions;
75```
76
77Defined in: [packages/ai/src/types.ts:2566](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L2566)
78
79Model-specific options for audio generation
80
81***
82
83### prompt
84
85```ts
86prompt: string;
87```
88
89Defined in: [packages/ai/src/types.ts:2562](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L2562)
90
91Text description of the desired audio