Class AudioSpeechCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class AudioSpeechCreateParams.Body.Builder
A builder for Body.
-
-
Method Summary
-
-
Method Detail
-
input
final AudioSpeechCreateParams.Body.Builder input(String input)
The text to generate audio for. The maximum length is 4096 characters.
-
input
final AudioSpeechCreateParams.Body.Builder input(JsonField<String> input)
The text to generate audio for. The maximum length is 4096 characters.
-
model
final AudioSpeechCreateParams.Body.Builder model(SpeechModel model)
One of the available TTS models:
tts-1
ortts-1-hd
-
model
final AudioSpeechCreateParams.Body.Builder model(JsonField<SpeechModel> model)
One of the available TTS models:
tts-1
ortts-1-hd
-
model
final AudioSpeechCreateParams.Body.Builder model(String value)
One of the available TTS models:
tts-1
ortts-1-hd
-
voice
final AudioSpeechCreateParams.Body.Builder voice(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.
-
voice
final AudioSpeechCreateParams.Body.Builder voice(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 AudioSpeechCreateParams.Body.Builder responseFormat(AudioSpeechCreateParams.ResponseFormat responseFormat)
The format to audio in. Supported formats are
mp3
,opus
,aac
,flac
,wav
, andpcm
.
-
responseFormat
final AudioSpeechCreateParams.Body.Builder responseFormat(JsonField<AudioSpeechCreateParams.ResponseFormat> responseFormat)
The format to audio in. Supported formats are
mp3
,opus
,aac
,flac
,wav
, andpcm
.
-
speed
final AudioSpeechCreateParams.Body.Builder speed(Double speed)
The speed of the generated audio. Select a value from
0.25
to4.0
.1.0
is the default.
-
speed
final AudioSpeechCreateParams.Body.Builder speed(JsonField<Double> speed)
The speed of the generated audio. Select a value from
0.25
to4.0
.1.0
is the default.
-
additionalProperties
final AudioSpeechCreateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final AudioSpeechCreateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final AudioSpeechCreateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final AudioSpeechCreateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final AudioSpeechCreateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final AudioSpeechCreateParams.Body build()
-
-
-
-