Only send TTSStoppedFrame from Gemini when in AUDIO mode, only send one LLMFullResponseEndFrame
This commit is contained in:
@@ -905,11 +905,12 @@ class GeminiMultimodalLiveLLMService(LLMService):
|
|||||||
text = self._bot_text_buffer
|
text = self._bot_text_buffer
|
||||||
self._bot_text_buffer = ""
|
self._bot_text_buffer = ""
|
||||||
|
|
||||||
# Pertains to modalities set to TEXT only
|
# Only push the TTSStoppedFrame the bot is outputting audio
|
||||||
if text:
|
# when text is found, modalities is set to TEXT and no audio
|
||||||
await self.push_frame(LLMFullResponseEndFrame())
|
# is produced.
|
||||||
|
if not text:
|
||||||
|
await self.push_frame(TTSStoppedFrame())
|
||||||
|
|
||||||
await self.push_frame(TTSStoppedFrame())
|
|
||||||
await self.push_frame(LLMFullResponseEndFrame())
|
await self.push_frame(LLMFullResponseEndFrame())
|
||||||
|
|
||||||
async def _handle_evt_output_transcription(self, evt):
|
async def _handle_evt_output_transcription(self, evt):
|
||||||
|
|||||||
Reference in New Issue
Block a user