LLMUserContextAggregator: make sure incoming transcription has text

This commit is contained in:
Aleix Conchillo Flaqué
2025-02-21 10:12:54 -08:00
parent 41720b1a13
commit 98706d429c

View File

@@ -293,7 +293,13 @@ class LLMUserContextAggregator(LLMContextResponseAggregator):
await self.push_aggregation()
async def _handle_transcription(self, frame: TranscriptionFrame):
self._aggregation += f" {frame.text}" if self._aggregation else frame.text
text = frame.text
# Make sure we really have some text.
if not text.strip():
return
self._aggregation += f" {text}" if self._aggregation else text
# We just got a final result, so let's reset interim results.
self._seen_interim_results = False
# Reset aggregation timer.