Defined in: packages/ai/src/types.ts:3011
Result of text-to-speech generation.
Properties#
alignment?#
optional alignment?: TTSAlignment;
Defined in: packages/ai/src/types.ts:3026
Character- or word-level timings, present when timestamps: true was
requested. Use this rather than duration to find where speech ends.
artifacts?#
optional artifacts?: PersistedArtifactRef[];
Defined in: packages/ai/src/types.ts:3037
Persisted artifact references for generated assets, when available
audio#
audio: string;
Defined in: packages/ai/src/types.ts:3017
Base64-encoded audio data
contentType?#
optional contentType?: string;
Defined in: packages/ai/src/types.ts:3033
Content type of the audio (e.g., 'audio/mp3')
duration?#
optional duration?: number;
Defined in: packages/ai/src/types.ts:3021
Duration of the audio file in seconds, if available
format#
format: string;
Defined in: packages/ai/src/types.ts:3019
Audio format of the generated audio
id#
id: string;
Defined in: packages/ai/src/types.ts:3013
Unique identifier for the generation
model#
model: string;
Defined in: packages/ai/src/types.ts:3015
Model used for generation
segments?#
optional segments?: TTSSegment[];
Defined in: packages/ai/src/types.ts:3031
Per-turn (or per-utterance) spans of the audio, present when
timestamps: true was requested and the provider reports segmentation.
usage?#
optional usage?: TokenUsage<ProviderUsageDetails>;
Defined in: packages/ai/src/types.ts:3035
Token usage information (if provided by the adapter)