Enum Class OpenAiAudioApi.TtsModel

java.lang.Object
java.lang.Enum<OpenAiAudioApi.TtsModel>
org.springframework.ai.openai.api.OpenAiAudioApi.TtsModel
All Implemented Interfaces:
Serializable, Comparable<OpenAiAudioApi.TtsModel>, Constable
Enclosing class:
OpenAiAudioApi

public static enum OpenAiAudioApi.TtsModel extends Enum<OpenAiAudioApi.TtsModel>
TTS is an AI model that converts text to natural sounding spoken text. We offer two different model variates, tts-1 is optimized for real time text to speech use cases and tts-1-hd is optimized for quality. These models can be used with the Speech endpoint in the Audio API. Reference: TTS
  • Enum Constant Details

    • TTS_1

      public static final OpenAiAudioApi.TtsModel TTS_1
      The latest text to speech model, optimized for speed.
    • TTS_1_HD

      public static final OpenAiAudioApi.TtsModel TTS_1_HD
      The latest text to speech model, optimized for quality.
  • Field Details

    • value

      public final String value
  • Method Details

    • values

      public static OpenAiAudioApi.TtsModel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OpenAiAudioApi.TtsModel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()