Class AudioResponseFormat

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.AudioResponseFormat

public abstract class AudioResponseFormat extends JsonSerializable
Configuration for audio-specific output formatting.
  • Constructor Details

    • AudioResponseFormat

      public AudioResponseFormat()
  • Method Details

    • bitRate

      public abstract Optional<Integer> bitRate()
      Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
    • delivery

      public abstract Optional<Delivery> delivery()
      Optional. Delivery mode for the generated content.
    • mimeType

      public abstract Optional<String> mimeType()
      Optional. The MIME type of the audio output.
    • sampleRate

      public abstract Optional<Integer> sampleRate()
      Optional. Sample rate for the generated audio in Hertz.
    • builder

      public static AudioResponseFormat.Builder builder()
      Instantiates a builder for AudioResponseFormat.
    • toBuilder

      public abstract AudioResponseFormat.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static AudioResponseFormat fromJson(String jsonString)
      Deserializes a JSON string to a AudioResponseFormat object.