Enum MotorSpeechFormat

java.lang.Object
java.lang.Enum<MotorSpeechFormat>
com.chatmotorapi.api.speech.MotorSpeechFormat
All Implemented Interfaces:
Serializable, Comparable<MotorSpeechFormat>, java.lang.constant.Constable

public enum MotorSpeechFormat
extends Enum<MotorSpeechFormat>
Enum representing the various response formats for speech processing when using OpenAI Speech. Each format specifies a different audio encoding type for the returned speech data. Default is MP3.
  • Enum Constant Details

    • MP3

      public static final MotorSpeechFormat MP3
      MP3 format. The response will be encoded in the widely-used MP3 format, suitable for a variety of playback devices and applications.
    • OPUS

      public static final MotorSpeechFormat OPUS
      OPUS format. The response will be encoded in the OPUS format, which is known for its high compression efficiency and audio quality, especially in real-time communication scenarios.
    • AAC

      public static final MotorSpeechFormat AAC
      AAC format. The response will be encoded in the AAC (Advanced Audio Coding) format, which provides excellent sound quality at lower bit rates and is commonly used in streaming and mobile applications.
    • FLAC

      public static final MotorSpeechFormat FLAC
      FLAC format. The response will be encoded in the FLAC (Free Lossless Audio Codec) format, which compresses audio without any loss in quality, making it ideal for archiving and high-fidelity audio applications.
    • WAV

      public static final MotorSpeechFormat WAV
      WAV format. The response will be encoded in the WAV (Waveform Audio File Format) format, which is an uncompressed audio format that maintains high audio quality and is widely used in professional audio editing and processing.
    • PCM

      public static final MotorSpeechFormat PCM
      PCM format. The response will be encoded in the PCM (Pulse Code Modulation) format, which is a raw audio format commonly used in CDs and digital audio processing, offering high fidelity without compression.
  • Method Details

    • values

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

      public static MotorSpeechFormat valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null