Class AudioSpeechCreateParams.Body
-
- All Implemented Interfaces:
public final class AudioSpeechCreateParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classAudioSpeechCreateParams.Body.BuilderA builder for Body.
-
Method Summary
Modifier and Type Method Description final Stringinput()The text to generate audio for. final SpeechModelmodel()One of the available TTS models: tts-1ortts-1-hdfinal AudioSpeechCreateParams.Voicevoice()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-1ortts-1-hdfinal 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.Bodyvalidate()final AudioSpeechCreateParams.Body.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static AudioSpeechCreateParams.Body.Builderbuilder()Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
model
final SpeechModel model()
One of the available TTS models:
tts-1ortts-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,sageandshimmer. 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.25to4.0.1.0is 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-1ortts-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,sageandshimmer. 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.25to4.0.1.0is 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()
-
-
-
-