Class AutomaticActivityDetection
-
- All Implemented Interfaces:
public abstract class AutomaticActivityDetection extends JsonSerializable
Configures automatic detection of activity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classAutomaticActivityDetection.BuilderBuilder for AutomaticActivityDetection.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description AutomaticActivityDetection()
-
Method Summary
Modifier and Type Method Description abstract Optional<Boolean>disabled()If enabled, detected voice and text input count as activity. abstract Optional<StartSensitivity>startOfSpeechSensitivity()Determines how likely speech is to be detected. abstract Optional<EndSensitivity>endOfSpeechSensitivity()Determines how likely detected speech is ended. abstract Optional<Integer>prefixPaddingMs()The required duration of detected speech before start-of-speech is committed. abstract Optional<Integer>silenceDurationMs()The required duration of detected non-speech (e.g. static AutomaticActivityDetection.Builderbuilder()Instantiates a builder for AutomaticActivityDetection. abstract AutomaticActivityDetection.BuildertoBuilder()Creates a builder with the same values as this instance. static AutomaticActivityDetectionfromJson(String jsonString)Deserializes a JSON string to a AutomaticActivityDetection object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
disabled
abstract Optional<Boolean> disabled()
If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals.
-
startOfSpeechSensitivity
abstract Optional<StartSensitivity> startOfSpeechSensitivity()
Determines how likely speech is to be detected.
-
endOfSpeechSensitivity
abstract Optional<EndSensitivity> endOfSpeechSensitivity()
Determines how likely detected speech is ended.
-
prefixPaddingMs
abstract Optional<Integer> 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
abstract Optional<Integer> 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
static AutomaticActivityDetection.Builder builder()
Instantiates a builder for AutomaticActivityDetection.
-
toBuilder
abstract AutomaticActivityDetection.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static AutomaticActivityDetection fromJson(String jsonString)
Deserializes a JSON string to a AutomaticActivityDetection object.
-
-
-
-