Class SpeechGenerationResponseFormat

java.lang.Object
com.azure.core.util.ExpandableStringEnum<SpeechGenerationResponseFormat>
com.azure.ai.openai.models.SpeechGenerationResponseFormat

public final class SpeechGenerationResponseFormat extends com.azure.core.util.ExpandableStringEnum<SpeechGenerationResponseFormat>
The supported audio output formats for text-to-speech.
  • Field Details

    • MP3

      public static final SpeechGenerationResponseFormat MP3
      Use MP3 as the audio output format. MP3 is the default, general-purpose format.
    • OPUS

      public static final SpeechGenerationResponseFormat OPUS
      Use Opus as the audio output format. Opus is optimized for internet streaming and low latency.
    • AAC

      public static final SpeechGenerationResponseFormat AAC
      Use AAC as the audio output format. AAC is optimized for digital audio compression and is preferred by YouTube, Android, and iOS.
    • FLAC

      public static final SpeechGenerationResponseFormat FLAC
      Use FLAC as the audio output format. FLAC is a fully lossless format optimized for maximum quality at the expense of size.
    • WAV

      public static final SpeechGenerationResponseFormat WAV
      Use uncompressed WAV as the audio output format, suitable for low-latency applications to avoid decoding overhead.
    • PCM

      public static final SpeechGenerationResponseFormat PCM
      Use uncompressed PCM as the audio output format, which is similar to WAV but contains raw samples in 24kHz (16-bit signed, low-endian), without the header.
  • Constructor Details

    • SpeechGenerationResponseFormat

      @Deprecated public SpeechGenerationResponseFormat()
      Deprecated.
      Use the fromString(String) factory method.
      Creates a new instance of SpeechGenerationResponseFormat value.
  • Method Details

    • fromString

      public static SpeechGenerationResponseFormat fromString(String name)
      Creates or finds a SpeechGenerationResponseFormat from its string representation.
      Parameters:
      name - a name to look for.
      Returns:
      the corresponding SpeechGenerationResponseFormat.
    • values

      public static Collection<SpeechGenerationResponseFormat> values()
      Gets known SpeechGenerationResponseFormat values.
      Returns:
      known SpeechGenerationResponseFormat values.