Class RealtimeAudioInputTurnDetection.ServerVad.Builder
-
- All Implemented Interfaces:
public final class RealtimeAudioInputTurnDetection.ServerVad.Builder
A builder for ServerVad.
-
-
Method Summary
-
-
Method Detail
-
type
final RealtimeAudioInputTurnDetection.ServerVad.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("server_vad")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
createResponse
final RealtimeAudioInputTurnDetection.ServerVad.Builder createResponse(Boolean createResponse)
Whether or not to automatically generate a response when a VAD stop event occurs.
-
createResponse
final RealtimeAudioInputTurnDetection.ServerVad.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.
-
idleTimeoutMs
final RealtimeAudioInputTurnDetection.ServerVad.Builder idleTimeoutMs(Long idleTimeoutMs)
Optional timeout after which a model response will be triggered automatically. This is useful for situations in which a long pause from the user is unexpected, such as a phone call. The model will effectively prompt the user to continue the conversation based on the current context.
The timeout value will be applied after the last model response's audio has finished playing, i.e. it's set to the
response.done
time plus audio playback duration.An
input_audio_buffer.timeout_triggered
event (plus events associated with the Response) will be emitted when the timeout is reached. Idle timeout is currently only supported forserver_vad
mode.
-
idleTimeoutMs
final RealtimeAudioInputTurnDetection.ServerVad.Builder idleTimeoutMs(Long idleTimeoutMs)
Alias for Builder.idleTimeoutMs.
This unboxed primitive overload exists for backwards compatibility.
-
idleTimeoutMs
final RealtimeAudioInputTurnDetection.ServerVad.Builder idleTimeoutMs(Optional<Long> idleTimeoutMs)
Alias for calling Builder.idleTimeoutMs with
idleTimeoutMs.orElse(null)
.
-
idleTimeoutMs
final RealtimeAudioInputTurnDetection.ServerVad.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 RealtimeAudioInputTurnDetection.ServerVad.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 RealtimeAudioInputTurnDetection.ServerVad.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 RealtimeAudioInputTurnDetection.ServerVad.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 RealtimeAudioInputTurnDetection.ServerVad.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 RealtimeAudioInputTurnDetection.ServerVad.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 RealtimeAudioInputTurnDetection.ServerVad.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 RealtimeAudioInputTurnDetection.ServerVad.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 RealtimeAudioInputTurnDetection.ServerVad.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.
-
additionalProperties
final RealtimeAudioInputTurnDetection.ServerVad.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RealtimeAudioInputTurnDetection.ServerVad.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RealtimeAudioInputTurnDetection.ServerVad.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RealtimeAudioInputTurnDetection.ServerVad.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RealtimeAudioInputTurnDetection.ServerVad.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RealtimeAudioInputTurnDetection.ServerVad build()
Returns an immutable instance of ServerVad.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-