Skip to content

ElevenLabsProvider.ElevenLabsSpeechModel

Namespace: Vercel.AI.ElevenLabs

public sealed class ElevenLabsProvider.ElevenLabsSpeechModel : ISpeechModel

ElevenLabs text-to-speech model.

Inheritance: object

Implements: ISpeechModel

View source

ElevenLabsSpeechModel(ElevenLabsProvider, string)

Section titled “ElevenLabsSpeechModel(ElevenLabsProvider, string)”
public ElevenLabsSpeechModel(ElevenLabsProvider provider, string modelId)

Creates a speech model.

Parameters

Name Type Description
provider ElevenLabsProvider
modelId string

View source

public string ModelId { get; }

Model id.

Value: string

View source

public string Provider { get; }

Provider id.

Value: string

View source

DoGenerateAsync(SpeechCallOptions, CancellationToken)

Section titled “DoGenerateAsync(SpeechCallOptions, CancellationToken)”
public Task<SpeechResult> DoGenerateAsync(SpeechCallOptions options, CancellationToken cancellationToken)

Synthesizes speech.

Parameters

Name Type Description
options SpeechCallOptions
cancellationToken CancellationToken

Returns: Task<SpeechResult>

View source

GenerateAsync(ElevenLabsSpeechRequest, CancellationToken)

Section titled “GenerateAsync(ElevenLabsSpeechRequest, CancellationToken)”
public Task<ElevenLabsSpeechResult> GenerateAsync(ElevenLabsSpeechRequest request, CancellationToken cancellationToken)

Synthesizes speech and returns the audio with warnings and response metadata.

Parameters

Name Type Description
request ElevenLabsSpeechRequest
cancellationToken CancellationToken

Returns: Task<ElevenLabsSpeechResult>

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product