Package com.azure.ai.openai.models
Class SpeechGenerationResponseFormat
java.lang.Object
com.azure.core.util.ExpandableStringEnum<SpeechGenerationResponseFormat>
com.azure.ai.openai.models.SpeechGenerationResponseFormat
- All Implemented Interfaces:
com.azure.core.util.ExpandableEnum<String>
public final class SpeechGenerationResponseFormat
extends com.azure.core.util.ExpandableStringEnum<SpeechGenerationResponseFormat>
The supported audio output formats for text-to-speech.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SpeechGenerationResponseFormatUse AAC as the audio output format.static final SpeechGenerationResponseFormatUse FLAC as the audio output format.static final SpeechGenerationResponseFormatUse MP3 as the audio output format.static final SpeechGenerationResponseFormatUse Opus as the audio output format.static final SpeechGenerationResponseFormatUse 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.static final SpeechGenerationResponseFormatUse uncompressed WAV as the audio output format, suitable for low-latency applications to avoid decoding overhead. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromString(String name) Creates or finds a SpeechGenerationResponseFormat from its string representation.values()Gets known SpeechGenerationResponseFormat values.Methods inherited from class com.azure.core.util.ExpandableStringEnum
equals, fromString, getValue, hashCode, toString, values
-
Field Details
-
MP3
Use MP3 as the audio output format. MP3 is the default, general-purpose format. -
OPUS
Use Opus as the audio output format. Opus is optimized for internet streaming and low latency. -
AAC
Use AAC as the audio output format. AAC is optimized for digital audio compression and is preferred by YouTube, Android, and iOS. -
FLAC
Use FLAC as the audio output format. FLAC is a fully lossless format optimized for maximum quality at the expense of size. -
WAV
Use uncompressed WAV as the audio output format, suitable for low-latency applications to avoid decoding overhead. -
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.Use thefromString(String)factory method.Creates a new instance of SpeechGenerationResponseFormat value.
-
-
Method Details
-
fromString
Creates or finds a SpeechGenerationResponseFormat from its string representation.- Parameters:
name- a name to look for.- Returns:
- the corresponding SpeechGenerationResponseFormat.
-
values
Gets known SpeechGenerationResponseFormat values.- Returns:
- known SpeechGenerationResponseFormat values.
-
fromString(String)factory method.