Class SessionCreateResponse.TurnDetection
-
- All Implemented Interfaces:
public final class SessionCreateResponse.TurnDetection
Configuration for turn detection. Can be set to
null
to turn off. 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
SessionCreateResponse.TurnDetection.Builder
A builder for TurnDetection.
-
Method Summary
Modifier and Type Method Description final Optional<Long>
prefixPaddingMs()
Amount of audio to include before the VAD detected speech (in milliseconds). final Optional<Long>
silenceDurationMs()
Duration of silence to detect speech stop (in milliseconds). final Optional<Double>
threshold()
Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. final Optional<String>
type()
Type of turn detection, only server_vad
is currently supported.final JsonField<Long>
_prefixPaddingMs()
Returns the raw JSON value of prefixPaddingMs. final JsonField<Long>
_silenceDurationMs()
Returns the raw JSON value of silenceDurationMs. final JsonField<Double>
_threshold()
Returns the raw JSON value of threshold. final JsonField<String>
_type()
Returns the raw JSON value of type. final Map<String, JsonValue>
_additionalProperties()
final SessionCreateResponse.TurnDetection.Builder
toBuilder()
final SessionCreateResponse.TurnDetection
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static SessionCreateResponse.TurnDetection.Builder
builder()
Returns a mutable builder for constructing an instance of TurnDetection. -
-
Method Detail
-
prefixPaddingMs
final Optional<Long> prefixPaddingMs()
Amount of audio to include before the VAD detected speech (in milliseconds). Defaults to 300ms.
-
silenceDurationMs
final Optional<Long> silenceDurationMs()
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.
-
threshold
final Optional<Double> threshold()
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.
-
_prefixPaddingMs
final JsonField<Long> _prefixPaddingMs()
Returns the raw JSON value of prefixPaddingMs.
Unlike prefixPaddingMs, this method doesn't throw if the JSON field has an unexpected type.
-
_silenceDurationMs
final JsonField<Long> _silenceDurationMs()
Returns the raw JSON value of silenceDurationMs.
Unlike silenceDurationMs, this method doesn't throw if the JSON field has an unexpected type.
-
_threshold
final JsonField<Double> _threshold()
Returns the raw JSON value of threshold.
Unlike threshold, this method doesn't throw if the JSON field has an unexpected type.
-
_type
final JsonField<String> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final SessionCreateResponse.TurnDetection.Builder toBuilder()
-
validate
final SessionCreateResponse.TurnDetection validate()
-
builder
final static SessionCreateResponse.TurnDetection.Builder builder()
Returns a mutable builder for constructing an instance of TurnDetection.
-
-
-
-