Class AudioResponseData

java.lang.Object
com.azure.ai.openai.models.AudioResponseData
All Implemented Interfaces:
com.azure.json.JsonSerializable<AudioResponseData>

public final class AudioResponseData extends Object implements com.azure.json.JsonSerializable<AudioResponseData>
Object containing audio response data and its metadata.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of AudioResponseData from the JsonReader.
    Get the data property: Base64 encoded audio bytes generated by the model, in the format specified in the request.
    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.
    Get the id property: Unique identifier for this audio response.
    Get the transcript property: Transcript of the audio generated by the model.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Method Details

    • getId

      public String getId()
      Get the id property: Unique identifier for this audio response.
      Returns:
      the id 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.
    • 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.
    • getTranscript

      public String getTranscript()
      Get the transcript property: Transcript of the audio generated by the model.
      Returns:
      the transcript value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<AudioResponseData>
      Throws:
      IOException
    • fromJson

      public static AudioResponseData fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the AudioResponseData.