Class References
Function References
- text
- textOptions
- combineStrategies
- convertMessagesToModelMessages
- convertZodToJsonSchema
- createReplayStream
- embedding
- generateMessageId
- maxIterations
- messages
- modelMessageToUIMessage
- modelMessagesToUIMessages
- normalizeToUIMessage
- parsePartialJSON
- summarize
- toServerSentEventsStream
- toServerSentEventsResponse
- toolDefinition
- uiMessageToModelMessages
- realtimeToken
- untilFinishReason
Interface References
- AIAdapter
- AIAdapterConfig
- AgentLoopState
- AudioPart
- AudioVisualization
- BaseStreamChunk
- TextCompletionChunk
- TextOptions
- ChunkRecording
- ChunkStrategy
- ClientTool
- ContentPartSource
- ContentStreamChunk
- DefaultMessageMetadataByModality
- DocumentPart
- DoneStreamChunk
- EmbeddingOptions
- EmbeddingResult
- ErrorStreamChunk
- ImagePart
- InternalToolCallState
- JSONParser
- ModelMessage
- ProcessorResult
- ProcessorState
- RealtimeAdapter
- RealtimeClientOptions
- RealtimeConnection
- RealtimeMessage
- RealtimeSessionConfig
- RealtimeToken
- RealtimeTokenAdapter
- RealtimeTokenOptions
- ResponseFormat
- ServerTool
- StreamProcessorEvents
- StreamProcessorHandlers
- StreamProcessorOptions
- SummarizationOptions
- SummarizationResult
- TextPart
- ThinkingPart
- ThinkingStreamChunk
- Tool
- ToolCall
- ToolCallPart
- ToolCallStreamChunk
- ToolConfig
- ToolDefinition
- ToolDefinitionConfig
- ToolDefinitionInstance
- ToolInputAvailableStreamChunk
- ToolResultPart
- ToolResultStreamChunk
- UIMessage
- VideoPart
Type Alias References
- AgentLoopStrategy
- AnyClientTool
- TextStreamOptionsForModel
- TextStreamOptionsUnion
- ConstrainedContent
- ConstrainedModelMessage
- ContentPart
- ContentPartForModalities
- ExtractModalitiesForModel
- ExtractModelsFromAdapter
- InferToolInput
- InferToolName
- InferToolOutput
- MessagePart
- RealtimeEvent
- RealtimeMessagePart
- RealtimeMode
- RealtimeStatus
- ModalitiesArrayToUnion
- Modality
- StreamChunk
- ToolCallState
- ToolResultState
Variable References
VoiceGenerationOptions
Defined in: packages/ai/src/types.ts:3070
Options for creating a voice.
Providers create voices in one of two ways, and some support both:
- design — synthesize a brand new voice from a text prompt.
- clone — derive a voice from referenceAudio of a real speaker.
At least one of prompt / referenceAudio is required; which ones an adapter accepts depends on the model. An adapter may require both — the only adapter today, elevenlabsVoiceDesign, always needs prompt and takes referenceAudio as an additional design reference.
Type Parameters#
TProviderOptions#
TProviderOptions extends object = object
Properties#
abortSignal?#
optional abortSignal?: AbortSignal;Defined in: packages/ai/src/types.ts:3105
Effective abort signal composed by the activity from caller abortSignal and/or timeout. Adapters should forward this to the provider SDK when supported. Request-specific - never store on a global client config.
description?#
optional description?: string;Defined in: packages/ai/src/types.ts:3091
Human-readable description stored alongside the voice
logger#
logger: InternalLogger;Defined in: packages/ai/src/types.ts:3099
Internal logger threaded from the generateVoice() entry point. Adapters must call logger.request() before the SDK call and logger.errors() in catch blocks.
model#
model: string;Defined in: packages/ai/src/types.ts:3074
The model to use for voice creation
modelOptions?#
optional modelOptions?: TProviderOptions;Defined in: packages/ai/src/types.ts:3093
Model-specific options for voice creation
name?#
optional name?: string;Defined in: packages/ai/src/types.ts:3089
Name to store the voice under in the provider's voice library. Providers differ on what this implies — ElevenLabs only persists a designed voice when a name is given. Read GeneratedVoice.saved to find out what actually happened.
prompt?#
optional prompt?: string;Defined in: packages/ai/src/types.ts:3076
Text description of the voice to create, for design-capable models
referenceAudio?#
optional referenceAudio?: string | ArrayBuffer | File | Blob;Defined in: packages/ai/src/types.ts:3082
Reference audio of the speaker to clone - base64 string, base64 data URL, File, Blob, or ArrayBuffer. For clone-capable models. Remote URLs are not accepted; read the file and pass the bytes.