Address review: remove UserStartedSpeakingFrame, add explanatory comment
This commit is contained in:
@@ -1 +1 @@
|
||||
- Added handling for `server_content.interrupted` signal in Gemini Live services for faster interruption response.
|
||||
- Added handling for `server_content.interrupted` signal in the Gemini Live service for faster interruption response in the case where there isn't already turn tracking in the pipeline, e.g. local VAD + context aggregators. When there is already turn tracking in the pipeline, the additional interruption does no harm.
|
||||
|
||||
@@ -1199,8 +1199,17 @@ class GeminiLiveLLMService(LLMService):
|
||||
self._check_and_reset_failure_counter()
|
||||
|
||||
if message.server_content and message.server_content.interrupted:
|
||||
# NOTE: while the service triggers interruptions in
|
||||
# the specific case of barge-ins, it does *not*
|
||||
# emit UserStarted/StoppedSpeakingFrames, as the
|
||||
# Gemini Live API does not give us broadly reliable
|
||||
# signals to base those off of. Pipelines that
|
||||
# require turn tracking (like those using context
|
||||
# aggregators) still need an independent way to
|
||||
# track turns, such as local Silero VAD in
|
||||
# combination with the context aggregator default
|
||||
# turn strategies.
|
||||
logger.debug("Gemini VAD: interrupted signal received")
|
||||
await self.broadcast_frame(UserStartedSpeakingFrame())
|
||||
await self.push_interruption_task_frame_and_wait()
|
||||
elif message.server_content and message.server_content.model_turn:
|
||||
await self._handle_msg_model_turn(message)
|
||||
|
||||
Reference in New Issue
Block a user