Gemini.Types.Live.AutomaticActivityDetection (GeminiEx v0.9.0)

Copy Markdown View Source

Automatic activity detection configuration for Live API sessions.

Configures automatic detection of user activity (voice and text input). When enabled (the default), the server automatically detects when the user starts and stops speaking.

Fields

  • disabled - If true, automatic detection is disabled and client must send activity signals
  • start_of_speech_sensitivity - How likely speech is to be detected at start
  • end_of_speech_sensitivity - How likely detected speech is to end
  • prefix_padding_ms - Duration of speech required before start-of-speech is committed
  • silence_duration_ms - Duration of silence required before end-of-speech is committed

Example

%AutomaticActivityDetection{
  disabled: false,
  start_of_speech_sensitivity: :high,
  end_of_speech_sensitivity: :low,
  prefix_padding_ms: 100,
  silence_duration_ms: 500
}

Summary

Functions

Parses from API response.

Creates a new AutomaticActivityDetection configuration.

Converts to API format (camelCase).

Types

t()

@type t() :: %Gemini.Types.Live.AutomaticActivityDetection{
  disabled: boolean() | nil,
  end_of_speech_sensitivity: Gemini.Types.Live.Enums.EndSensitivity.t() | nil,
  prefix_padding_ms: integer() | nil,
  silence_duration_ms: integer() | nil,
  start_of_speech_sensitivity:
    Gemini.Types.Live.Enums.StartSensitivity.t() | nil
}

Functions

from_api(data)

@spec from_api(map() | nil) :: t() | nil

Parses from API response.

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a new AutomaticActivityDetection configuration.

to_api(value)

@spec to_api(t() | nil) :: map() | nil

Converts to API format (camelCase).