Class AudioOutputParameters

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

public final class AudioOutputParameters extends Object implements com.azure.json.JsonSerializable<AudioOutputParameters>
Describes the parameters for audio output.
  • Constructor Details

    • AudioOutputParameters

      public AudioOutputParameters(SpeechVoice voice, OutputAudioFormat format)
      Creates an instance of AudioOutputParameters class.
      Parameters:
      voice - the voice value to set.
      format - the format value to set.
  • Method Details

    • getVoice

      public SpeechVoice getVoice()
      Get the voice property: Specifies the voice type.
      Returns:
      the voice value.
    • getFormat

      public OutputAudioFormat getFormat()
      Get the format property: Specifies the output audio format.
      Returns:
      the format value.
    • toJson

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

      public static AudioOutputParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AudioOutputParameters from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AudioOutputParameters 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 AudioOutputParameters.