Skip to content

ElevenLabsSpeechRequest

Namespace: Vercel.AI.ElevenLabs

public sealed class ElevenLabsSpeechRequest

One ElevenLabs text-to-speech call.

Inheritance: object

View source

public ElevenLabsSpeechRequest(string text)

Creates a speech request.

Parameters

Name Type Description
text string

View source

public const string DefaultVoiceId = "21m00Tcm4TlvDq8ikWAM"

Default voice used when the caller does not set one.

Value: string

View source

public IDictionary<string, string>? Headers { get; set; }

Headers merged over the provider headers.

Value: IDictionary<string, string>

View source

public string? Instructions { get; set; }

Ignored. ElevenLabs does not accept instructions; a warning is returned.

Value: string

View source

public string? Language { get; set; }

Language code, sent as language_code.

Value: string

View source

public string OutputFormat { get; set; }

Output format, such as mp3 or pcm_44100. Sent as the output_format query parameter.

Value: string

View source

public JsonElement? ProviderOptions { get; set; }

Provider options. The elevenlabs object is read.

Value: JsonElement?

View source

public double? Speed { get; set; }

Speaking rate, sent in voice_settings.

Value: double?

View source

public string Text { get; }

Text to speak.

Value: string

View source

public string? Voice { get; set; }

Voice id. Null selects DefaultVoiceId.

Value: string

View source

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