Class RealtimeSessionCreateResponse.Audio.Input.Builder
-
- All Implemented Interfaces:
public final class RealtimeSessionCreateResponse.Audio.Input.BuilderA builder for Input.
-
-
Method Summary
-
-
Method Detail
-
format
final RealtimeSessionCreateResponse.Audio.Input.Builder format(RealtimeAudioFormats format)
The format of the input audio.
-
format
final RealtimeSessionCreateResponse.Audio.Input.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 RealtimeSessionCreateResponse.Audio.Input.Builder format(RealtimeAudioFormats.AudioPcm audioPcm)
Alias for calling format with
RealtimeAudioFormats.ofAudioPcm(audioPcm).
-
format
final RealtimeSessionCreateResponse.Audio.Input.Builder format(RealtimeAudioFormats.AudioPcmu audioPcmu)
Alias for calling format with
RealtimeAudioFormats.ofAudioPcmu(audioPcmu).
-
format
final RealtimeSessionCreateResponse.Audio.Input.Builder format(RealtimeAudioFormats.AudioPcma audioPcma)
Alias for calling format with
RealtimeAudioFormats.ofAudioPcma(audioPcma).
-
noiseReduction
final RealtimeSessionCreateResponse.Audio.Input.Builder noiseReduction(RealtimeSessionCreateResponse.Audio.Input.NoiseReduction noiseReduction)
Configuration for input audio noise reduction. This can be set to
nullto turn off. Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
-
noiseReduction
final RealtimeSessionCreateResponse.Audio.Input.Builder noiseReduction(JsonField<RealtimeSessionCreateResponse.Audio.Input.NoiseReduction> noiseReduction)
Sets Builder.noiseReduction to an arbitrary JSON value.
You should usually call Builder.noiseReduction with a well-typed NoiseReduction value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
transcription
final RealtimeSessionCreateResponse.Audio.Input.Builder transcription(AudioTranscription transcription)
-
transcription
final RealtimeSessionCreateResponse.Audio.Input.Builder transcription(JsonField<AudioTranscription> transcription)
Sets Builder.transcription to an arbitrary JSON value.
You should usually call Builder.transcription with a well-typed AudioTranscription value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
turnDetection
final RealtimeSessionCreateResponse.Audio.Input.Builder turnDetection(RealtimeSessionCreateResponse.Audio.Input.TurnDetection turnDetection)
Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to
nullto turn off, in which case the client must manually trigger model response.Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.
Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
For
gpt-realtime-whispertranscription sessions, turn detection must be set tonull; VAD is not supported.
-
turnDetection
final RealtimeSessionCreateResponse.Audio.Input.Builder turnDetection(Optional<RealtimeSessionCreateResponse.Audio.Input.TurnDetection> turnDetection)
Alias for calling Builder.turnDetection with
turnDetection.orElse(null).
-
turnDetection
final RealtimeSessionCreateResponse.Audio.Input.Builder turnDetection(JsonField<RealtimeSessionCreateResponse.Audio.Input.TurnDetection> turnDetection)
Sets Builder.turnDetection to an arbitrary JSON value.
You should usually call Builder.turnDetection with a well-typed TurnDetection value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
turnDetection
final RealtimeSessionCreateResponse.Audio.Input.Builder turnDetection(RealtimeSessionCreateResponse.Audio.Input.TurnDetection.ServerVad serverVad)
Alias for calling turnDetection with
TurnDetection.ofServerVad(serverVad).
-
turnDetection
final RealtimeSessionCreateResponse.Audio.Input.Builder turnDetection(RealtimeSessionCreateResponse.Audio.Input.TurnDetection.SemanticVad semanticVad)
Alias for calling turnDetection with
TurnDetection.ofSemanticVad(semanticVad).
-
additionalProperties
final RealtimeSessionCreateResponse.Audio.Input.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RealtimeSessionCreateResponse.Audio.Input.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RealtimeSessionCreateResponse.Audio.Input.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RealtimeSessionCreateResponse.Audio.Input.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RealtimeSessionCreateResponse.Audio.Input.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RealtimeSessionCreateResponse.Audio.Input build()
Returns an immutable instance of Input.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-