Share via


AudioResponseData Class

  • java.lang.Object
    • com.azure.ai.openai.models.AudioResponseData

Implements

public final class AudioResponseData
implements JsonSerializable<AudioResponseData>

Object containing audio response data and its metadata.

Method Summary

Modifier and Type Method and Description
static AudioResponseData fromJson(JsonReader jsonReader)

Reads an instance of AudioResponseData from the JsonReader.

String getData()

Get the data property: Base64 encoded audio bytes generated by the model, in the format specified in the request.

OffsetDateTime getExpiresAt()

Get the expiresAt property: The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.

String getId()

Get the id property: Unique identifier for this audio response.

String getTranscript()

Get the transcript property: Transcript of the audio generated by the model.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static AudioResponseData fromJson(JsonReader jsonReader)

Reads an instance of AudioResponseData from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AudioResponseData if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getData

public String getData()

Get the data property: Base64 encoded audio bytes generated by the model, in the format specified in the request.

Returns:

the data value.

getExpiresAt

public OffsetDateTime getExpiresAt()

Get the expiresAt property: The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.

Returns:

the expiresAt value.

getId

public String getId()

Get the id property: Unique identifier for this audio response.

Returns:

the id value.

getTranscript

public String getTranscript()

Get the transcript property: Transcript of the audio generated by the model.

Returns:

the transcript value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to