Repository navigation
feat(gemini): map live start- and end-of-speech sensitivity - #47139
Closed
tech-carrement wants to merge 1 commit into
Closed
tech-carrement wants to merge 1 commit into
tech-carrement wants to merge 1 commit into
Conversation
Contributor
Merging this PR will not alter performance
|
Gemini Live's automaticActivityDetection accepts startOfSpeechSensitivity and endOfSpeechSensitivity, but nothing filled them: a client streaming the microphone continuously saw its sentences cut into fragments by an eager end-of-speech detection. OpenAI has no equivalent, so the client passes them under their Gemini names in snake_case; values outside the enums are dropped.
tech-carrement
force-pushed
the
feat-gemini-live-vad-sensitivity
branch
from
October 17, 2026 17:52
ec3cf28 to
c794d23
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
Closing this temporarily: this account is capped at five open PRs on the repo and two Gemini Live protocol fixes need the slots first. The branch is unchanged (c794d23, CI green, proof in the description); I will reopen it as soon as a slot frees. |
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
automaticActivityDetectionacceptsstartOfSpeechSensitivityandendOfSpeechSensitivity, but nothing in the OpenAI-shapedturn_detectionmapping filled themHow it solves it:
turn_detection.start_of_speech_sensitivityandturn_detection.end_of_speech_sensitivity(the Gemini names in snake_case, since OpenAI has no equivalent) are forwarded toautomaticActivityDetectionStartOfSpeechSensitivityEnum/EndOfSpeechSensitivityEnumliterals are dropped rather than sent, because Gemini closes the socket on an unknown enum valueUser Flow
Before: a developer tunes
turn_detectiononws://localhost:4000/v1/realtime?model=gemini-livesession.updatewithsilence_duration_msandend_of_speech_sensitivity: END_SENSITIVITY_LOWsilenceDurationMs; the sensitivity is silently lostAfter: the same
session.updatestartOfSpeechSensitivity/endOfSpeechSensitivitynext tosilenceDurationMsPre-Submission checklist
tests/unitdirectory, Adding at least 1 test is a hard requirementmake test-unitProof of Fix
The
setup.realtimeInputConfigbuilt byVertexAIRealtimeConfig.transform_realtime_requestfrom the samesession.update(server_vad,silence_duration_ms: 700, both sensitivitiesLOW), run against each tree:Live LiteLLM proxy at the PR tip
c794d231c6,vertex_ai/gemini-3.8-liveineu, real calls, the samesession.updatethen one user text item:Gemini accepted the setup (no 1007) and answered. Unit test:
tests/unit/llms/gemini/realtime/test_gemini_realtime_transformation.py::test_gemini_maps_the_two_vad_sensitivitiesType
🆕 New Feature
Caveats
turn_detection; other providers ignore themcreate_response: falseon a model that rejects tuning next todisabled: true, the existing early return applies and the sensitivities are not sentFinal Attestation