Class RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder
-
- All Implemented Interfaces:
public final class RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder
A builder for TurnDetection.
-
-
Method Summary
-
-
Method Detail
-
createResponse
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder createResponse(Boolean createResponse)
Whether or not to automatically generate a response when a VAD stop event occurs.
-
createResponse
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder createResponse(JsonField<Boolean> createResponse)
Sets Builder.createResponse to an arbitrary JSON value.
You should usually call Builder.createResponse with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
eagerness
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder eagerness(RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Eagerness eagerness)
Used only for
semantic_vad
mode. The eagerness of the model to respond.low
will wait longer for the user to continue speaking,high
will respond more quickly.auto
is the default and is equivalent tomedium
.low
,medium
, andhigh
have max timeouts of 8s, 4s, and 2s respectively.
-
eagerness
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder eagerness(JsonField<RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Eagerness> eagerness)
Sets Builder.eagerness to an arbitrary JSON value.
You should usually call Builder.eagerness with a well-typed Eagerness value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
idleTimeoutMs
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder idleTimeoutMs(Long idleTimeoutMs)
Optional idle timeout after which turn detection will auto-timeout when no additional audio is received and emits a
timeout_triggered
event.
-
idleTimeoutMs
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder idleTimeoutMs(Long idleTimeoutMs)
Alias for Builder.idleTimeoutMs.
This unboxed primitive overload exists for backwards compatibility.
-
idleTimeoutMs
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder idleTimeoutMs(Optional<Long> idleTimeoutMs)
Alias for calling Builder.idleTimeoutMs with
idleTimeoutMs.orElse(null)
.
-
idleTimeoutMs
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder idleTimeoutMs(JsonField<Long> idleTimeoutMs)
Sets Builder.idleTimeoutMs to an arbitrary JSON value.
You should usually call Builder.idleTimeoutMs with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
interruptResponse
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder interruptResponse(Boolean interruptResponse)
Whether or not to automatically interrupt any ongoing response with output to the default conversation (i.e.
conversation
ofauto
) when a VAD start event occurs.
-
interruptResponse
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder interruptResponse(JsonField<Boolean> interruptResponse)
Sets Builder.interruptResponse to an arbitrary JSON value.
You should usually call Builder.interruptResponse with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
prefixPaddingMs
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder prefixPaddingMs(Long prefixPaddingMs)
Used only for
server_vad
mode. Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.
-
prefixPaddingMs
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder prefixPaddingMs(JsonField<Long> prefixPaddingMs)
Sets Builder.prefixPaddingMs to an arbitrary JSON value.
You should usually call Builder.prefixPaddingMs with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
silenceDurationMs
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder silenceDurationMs(Long silenceDurationMs)
Used only for
server_vad
mode. Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms. With shorter values the model will respond more quickly, but may jump in on short pauses from the user.
-
silenceDurationMs
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder silenceDurationMs(JsonField<Long> silenceDurationMs)
Sets Builder.silenceDurationMs to an arbitrary JSON value.
You should usually call Builder.silenceDurationMs with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
threshold
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder threshold(Double threshold)
Used only for
server_vad
mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.
-
threshold
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder threshold(JsonField<Double> threshold)
Sets Builder.threshold to an arbitrary JSON value.
You should usually call Builder.threshold with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder type(RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Type type)
Type of turn detection.
-
type
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder type(JsonField<RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Type> type)
Sets Builder.type to an arbitrary JSON value.
You should usually call Builder.type with a well-typed Type value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RealtimeSessionCreateResponse.Audio.Input.TurnDetection build()
Returns an immutable instance of TurnDetection.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-