Skip to content

OpenAISpeechCall

Namespace: Vercel.AI.OpenAI

public sealed class OpenAISpeechCall

Speech synthesis settings.

Inheritance: object

View source

public OpenAISpeechCall(string text)

Creates a speech call.

Parameters

Name Type Description
text string

View source

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

Extra HTTP headers.

Value: IReadOnlyDictionary<string, string>

View source

public string? Instructions { get; set; }

Speaking instructions.

Value: string

View source

public string? Language { get; set; }

Language. OpenAI speech models ignore it.

Value: string

View source

public string? OutputFormat { get; set; }

Audio format. Unsupported values fall back to mp3.

Value: string

View source

public JsonElement? ProviderOptions { get; set; }

Provider options. openai.speed and openai.instructions override the call.

Value: JsonElement?

View source

public double? Speed { get; set; }

Playback speed.

Value: double?

View source

public string Text { get; }

Text to speak.

Value: string

View source

public string? Voice { get; set; }

Voice. Defaults to alloy.

Value: string

View source

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