SpeechGenerationOptions Class

Definition

A representation of the request options that control the behavior of a text-to-speech operation.

public class SpeechGenerationOptions : System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.SpeechGenerationOptions>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.SpeechGenerationOptions>
type SpeechGenerationOptions = class
    interface IJsonModel<SpeechGenerationOptions>
    interface IPersistableModel<SpeechGenerationOptions>
Public Class SpeechGenerationOptions
Implements IJsonModel(Of SpeechGenerationOptions), IPersistableModel(Of SpeechGenerationOptions)
Inheritance
SpeechGenerationOptions
Implements

Constructors

SpeechGenerationOptions()

Initializes a new instance of SpeechGenerationOptions.

SpeechGenerationOptions(String, String, SpeechVoice)

Initializes a new instance of SpeechGenerationOptions.

Properties

DeploymentName

The deployment name to use for text-to-speech.

Input

The text to generate audio for. The maximum length is 4096 characters.

ResponseFormat

The audio output format for the spoken text. By default, the MP3 format will be used.

Speed

The speed of speech for generated audio. Values are valid in the range from 0.25 to 4.0, with 1.0 the default and higher values corresponding to faster speech.

Voice

The voice to use for text-to-speech.

Explicit Interface Implementations

IJsonModel<SpeechGenerationOptions>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<SpeechGenerationOptions>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<SpeechGenerationOptions>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<SpeechGenerationOptions>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<SpeechGenerationOptions>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to