Class AudioSpeechCreateParams
-
- All Implemented Interfaces:
-
com.openai.core.Params
public final class AudioSpeechCreateParams implements Params
Generates audio from the input text.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classAudioSpeechCreateParams.Bodypublic final classAudioSpeechCreateParams.BuilderA builder for AudioSpeechCreateParams.
public final classAudioSpeechCreateParams.VoiceThe 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.public final classAudioSpeechCreateParams.ResponseFormatThe format to audio in. Supported formats are
mp3,opus,aac,flac,wav, andpcm.
-
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>_additionalBodyProperties()final Headers_additionalHeaders()final QueryParams_additionalQueryParams()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. final AudioSpeechCreateParams.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static AudioSpeechCreateParams.Builderbuilder()Returns a mutable builder for constructing an instance of AudioSpeechCreateParams. -
-
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.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
toBuilder
final AudioSpeechCreateParams.Builder toBuilder()
-
builder
final static AudioSpeechCreateParams.Builder builder()
Returns a mutable builder for constructing an instance of AudioSpeechCreateParams.
The following fields are required:
.input() .model() .voice()
-
-
-
-