GeminiRealtime
Google Gemini realtime (speech-to-speech / live) provider.Constructor
cleanup
close
getRuntimeConfig
GeminiLiveConfig
Configuration for the Google Gemini Live (realtime speech-to-speech) provider. All fields are optional; unset values fall back to the defaults noted on each field. Pass an instance as theconfig option to GeminiRealtime.
Fields
Gemini Live model id to use.
Prebuilt Gemini voice name for synthesized audio output (e.g. ‘Puck’,
‘Charon’, ‘Kore’, ‘Fenrir’, ‘Aoede’).
Output modalities the model should produce. Typically
['AUDIO'] for
speech-to-speech or ['TEXT'] for text responses.Nucleus sampling probability mass (0..1). Higher values widen token
selection.
null leaves it unset (model default).Top-k sampling: restrict sampling to the k most likely tokens.
null
leaves it unset (model default).Maximum number of tokens to generate per response.
null leaves it unset
(model default).Presence penalty; positive values discourage reusing tokens already
present, encouraging new topics.
null leaves it unset (model default).Frequency penalty; positive values discourage repeating frequent tokens.
null leaves it unset (model default).Number of candidate responses to generate.
null leaves it unset (model
default, typically 1).BCP-47 language code hint for output (e.g. ‘en-US’).
null lets the model
auto-detect.Token budget allotted to the model’s internal “thinking” reasoning.
null
leaves it unset (model default).Whether to include the model’s thought summaries in the response.
Voice-activity-detection start sensitivity for detecting speech onset
(e.g. ‘START_SENSITIVITY_LOW’ / ‘START_SENSITIVITY_HIGH’).
null uses the
model default.Voice-activity-detection end sensitivity for detecting speech end (e.g.
‘END_SENSITIVITY_LOW’ / ‘END_SENSITIVITY_HIGH’).
null uses the model
default.Milliseconds of audio to retain before detected speech starts.
null uses
the model default.Milliseconds of trailing silence required before speech is considered
ended.
null uses the model default.Token count at which context compression is triggered to keep the session
within the context window.
null disables/uses the model default.Handle from a previous session used to resume that session’s state.
null
starts a fresh session.Whether to emit transcriptions of the user’s input audio.
Whether to emit transcriptions of the model’s output audio.
Use Vertex AI authentication instead of a Gemini API key. When
true,
vertexProjectId is required.Google Cloud project id for Vertex AI. Required when vertexai is
true.Google Cloud region for Vertex AI requests.
Vertex AI service-account credentials, as a JSON string or parsed object.
If unset, falls back to vertexServiceAccountPath, then the
GOOGLE_APPLICATION_CREDENTIALS environment variable.Filesystem path to a Vertex AI service-account JSON key file. Used only
when vertexServiceAccountJson is not provided.