Package com.chatmotorapi.api.speech
Enum 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static MotorSpeechFormat
valueOf(String name)
Returns the enum constant of this type with the specified name.static MotorSpeechFormat[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
MP3
MP3 format. The response will be encoded in the widely-used MP3 format, suitable for a variety of playback devices and applications. -
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
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
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
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
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
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
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 nameNullPointerException
- if the argument is null
-