Package com.google.genai.types
Class AutomaticActivityDetection
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.AutomaticActivityDetection
Configures automatic detection of activity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for AutomaticActivityDetection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Instantiates a builder for AutomaticActivityDetection.disabled()
If enabled, detected voice and text input count as activity.abstract Optional<EndSensitivity>
Determines how likely detected speech is ended.static AutomaticActivityDetection
Deserializes a JSON string to a AutomaticActivityDetection object.The required duration of detected speech before start-of-speech is committed.The required duration of detected non-speech (e.g.abstract Optional<StartSensitivity>
Determines how likely speech is to be detected.abstract AutomaticActivityDetection.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonString, toJson
-
Constructor Details
-
AutomaticActivityDetection
public AutomaticActivityDetection()
-
-
Method Details
-
disabled
If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. -
startOfSpeechSensitivity
Determines how likely speech is to be detected. -
endOfSpeechSensitivity
Determines how likely detected speech is ended. -
prefixPaddingMs
The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. -
silenceDurationMs
The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. -
builder
Instantiates a builder for AutomaticActivityDetection. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a AutomaticActivityDetection object.
-