Class RealtimeAudioConfigOutput.Builder
-
- All Implemented Interfaces:
public final class RealtimeAudioConfigOutput.Builder
A builder for RealtimeAudioConfigOutput.
-
-
Method Summary
-
-
Method Detail
-
format
final RealtimeAudioConfigOutput.Builder format(RealtimeAudioFormats format)
The format of the output audio.
-
format
final RealtimeAudioConfigOutput.Builder format(JsonField<RealtimeAudioFormats> format)
Sets Builder.format to an arbitrary JSON value.
You should usually call Builder.format with a well-typed RealtimeAudioFormats value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
format
final RealtimeAudioConfigOutput.Builder format(RealtimeAudioFormats.AudioPcm audioPcm)
Alias for calling format with
RealtimeAudioFormats.ofAudioPcm(audioPcm)
.
-
format
final RealtimeAudioConfigOutput.Builder format(RealtimeAudioFormats.AudioPcmu audioPcmu)
Alias for calling format with
RealtimeAudioFormats.ofAudioPcmu(audioPcmu)
.
-
format
final RealtimeAudioConfigOutput.Builder format(RealtimeAudioFormats.AudioPcma audioPcma)
Alias for calling format with
RealtimeAudioFormats.ofAudioPcma(audioPcma)
.
-
speed
final RealtimeAudioConfigOutput.Builder speed(Double speed)
The speed of the model's spoken response as a multiple of the original speed. 1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.
This parameter is a post-processing adjustment to the audio after it is generated, it's also possible to prompt the model to speak faster or slower.
-
speed
final RealtimeAudioConfigOutput.Builder speed(JsonField<Double> speed)
Sets Builder.speed to an arbitrary JSON value.
You should usually call Builder.speed with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
voice
final RealtimeAudioConfigOutput.Builder voice(RealtimeAudioConfigOutput.Voice voice)
The voice the model uses to respond. Voice cannot be changed during the session once the model has responded with audio at least once. Current voice options are
alloy
,ash
,ballad
,coral
,echo
,sage
,shimmer
,verse
,marin
, andcedar
. We recommendmarin
andcedar
for best quality.
-
voice
final RealtimeAudioConfigOutput.Builder voice(JsonField<RealtimeAudioConfigOutput.Voice> voice)
Sets Builder.voice to an arbitrary JSON value.
You should usually call Builder.voice with a well-typed Voice value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
voice
final RealtimeAudioConfigOutput.Builder voice(String value)
Sets voice to an arbitrary String.
You should usually call voice with a well-typed Voice constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final RealtimeAudioConfigOutput.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RealtimeAudioConfigOutput.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RealtimeAudioConfigOutput.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RealtimeAudioConfigOutput.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RealtimeAudioConfigOutput.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RealtimeAudioConfigOutput build()
Returns an immutable instance of RealtimeAudioConfigOutput.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-