AudioTranslationOptions Class

Definition

The configuration information for an audio translation request.

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

Constructors

AudioTranslationOptions()

Initializes a new instance ofAudioTranslationOptions.

AudioTranslationOptions(String, BinaryData)

Initializes a new instance of AudioTranslationOptions.

Properties

AudioData

The audio data to transcribe. This must be the binary content of a file in one of the supported media formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm.

To assign a byte[] to this property use FromBytes(Byte[]). The byte[] will be serialized to a Base64 encoded string.

Examples:

  • BinaryData.FromBytes(new byte[] { 1, 2, 3 }): Creates a payload of "AQID".
DeploymentName

The deployment name to use for audio translation.

Filename

The optional filename or descriptive identifier to associate with with the audio data.

Prompt

An optional hint to guide the model's style or continue from a prior audio segment. The written language of the prompt should match the primary spoken language of the audio data.

ResponseFormat

The requested format of the translation response data, which will influence the content and detail of the result.

Temperature

The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.

Explicit Interface Implementations

IJsonModel<AudioTranslationOptions>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<AudioTranslationOptions>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<AudioTranslationOptions>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<AudioTranslationOptions>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<AudioTranslationOptions>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to