Skip to content

SpeechModelCall

Namespace: Vercel.AI.Operations

public sealed class SpeechModelCall

Arguments for doGenerate on a speech model.

Inheritance: object

View source

SpeechModelCall(string, string?, string?, string?, double?, string?, JsonElement, IReadOnlyDictionary<string, string>, CancellationToken)

Section titled “SpeechModelCall(string, string?, string?, string?, double?, string?, JsonElement, IReadOnlyDictionary<string, string>, CancellationToken)”
public SpeechModelCall(string text, string? voice, string? outputFormat, string? instructions, double? speed, string? language, JsonElement providerOptions, IReadOnlyDictionary<string, string> headers, CancellationToken cancellationToken)

Creates a speech call.

Parameters

Name Type Description
text string
voice string
outputFormat string
instructions string
speed double?
language string
providerOptions JsonElement
headers IReadOnlyDictionary<string, string>
cancellationToken CancellationToken

View source

public CancellationToken CancellationToken { get; }

Cancellation token.

Value: CancellationToken

View source

public IReadOnlyDictionary<string, string> Headers { get; }

Headers including the user-agent suffix.

Value: IReadOnlyDictionary<string, string>

View source

public string? Instructions { get; }

Speaking instructions.

Value: string

View source

public string? Language { get; }

Language or auto.

Value: string

View source

public string? OutputFormat { get; }

Requested output format.

Value: string

View source

public JsonElement ProviderOptions { get; }

Provider options. Empty object when omitted.

Value: JsonElement

View source

public double? Speed { get; }

Playback speed.

Value: double?

View source

public string Text { get; }

Text to speak.

Value: string

View source

public string? Voice { get; }

Voice id.

Value: string

View source

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