Class AudioSpeechCreateParams.Body
-
- All Implemented Interfaces:
public final class AudioSpeechCreateParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
AudioSpeechCreateParams.Body.Builder
A builder for Body.
-
Method Summary
Modifier and Type Method Description final String
input()
The text to generate audio for. final SpeechModel
model()
One of the available TTS models: tts-1
ortts-1-hd
final AudioSpeechCreateParams.Voice
voice()
The voice to use when generating the audio. final Optional<AudioSpeechCreateParams.ResponseFormat>
responseFormat()
The format to audio in. final Optional<Double>
speed()
The speed of the generated audio. final JsonField<String>
_input()
The text to generate audio for. final JsonField<SpeechModel>
_model()
One of the available TTS models: tts-1
ortts-1-hd
final JsonField<AudioSpeechCreateParams.Voice>
_voice()
The voice to use when generating the audio. final JsonField<AudioSpeechCreateParams.ResponseFormat>
_responseFormat()
The format to audio in. final JsonField<Double>
_speed()
The speed of the generated audio. final Map<String, JsonValue>
_additionalProperties()
final AudioSpeechCreateParams.Body
validate()
final AudioSpeechCreateParams.Body.Builder
toBuilder()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static AudioSpeechCreateParams.Body.Builder
builder()
Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
model
final SpeechModel model()
One of the available TTS models:
tts-1
ortts-1-hd
-
voice
final AudioSpeechCreateParams.Voice voice()
The voice to use when generating the audio. Supported voices are
alloy
,ash
,coral
,echo
,fable
,onyx
,nova
,sage
andshimmer
. Previews of the voices are available in the Text to speech guide.
-
responseFormat
final Optional<AudioSpeechCreateParams.ResponseFormat> responseFormat()
The format to audio in. Supported formats are
mp3
,opus
,aac
,flac
,wav
, andpcm
.
-
speed
final Optional<Double> speed()
The speed of the generated audio. Select a value from
0.25
to4.0
.1.0
is the default.
-
_input
final JsonField<String> _input()
The text to generate audio for. The maximum length is 4096 characters.
-
_model
final JsonField<SpeechModel> _model()
One of the available TTS models:
tts-1
ortts-1-hd
-
_voice
final JsonField<AudioSpeechCreateParams.Voice> _voice()
The voice to use when generating the audio. Supported voices are
alloy
,ash
,coral
,echo
,fable
,onyx
,nova
,sage
andshimmer
. Previews of the voices are available in the Text to speech guide.
-
_responseFormat
final JsonField<AudioSpeechCreateParams.ResponseFormat> _responseFormat()
The format to audio in. Supported formats are
mp3
,opus
,aac
,flac
,wav
, andpcm
.
-
_speed
final JsonField<Double> _speed()
The speed of the generated audio. Select a value from
0.25
to4.0
.1.0
is the default.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final AudioSpeechCreateParams.Body validate()
-
toBuilder
final AudioSpeechCreateParams.Body.Builder toBuilder()
-
builder
final static AudioSpeechCreateParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
The following fields are required:
.input() .model() .voice()
-
-
-
-