From 9cd07d81f83e7859e0258f0f215a42e738488767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Mon, 10 Jun 2024 18:24:57 -0700 Subject: [PATCH] processors: fix LLMResponseAggregator with lower VAD values --- CHANGELOG.md | 3 +++ src/pipecat/processors/aggregators/llm_response.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f16fafe2..1c4642684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed an issue that would cause LLM aggregator to fail with small + `VADParams.stop_secs` values. + - Fixed an issue where `BaseOutputTransport` would send longer audio frames preventing interruptions. diff --git a/src/pipecat/processors/aggregators/llm_response.py b/src/pipecat/processors/aggregators/llm_response.py index fdab187bd..4f2882e9d 100644 --- a/src/pipecat/processors/aggregators/llm_response.py +++ b/src/pipecat/processors/aggregators/llm_response.py @@ -71,7 +71,8 @@ class LLMResponseAggregator(FrameProcessor): # S I T E -> X # S I E T -> X # S I E I T -> X - # + # S E T -> X + # S E I T -> X # The following case would not be supported: # # S I E T1 I T2 -> X @@ -96,7 +97,7 @@ class LLMResponseAggregator(FrameProcessor): # We might have received the end frame but we might still be # aggregating (i.e. we have seen interim results but not the final # text). - self._aggregating = self._seen_interim_results + self._aggregating = self._seen_interim_results or len(self._aggregation) == 0 # Send the aggregation if we are not aggregating anymore (i.e. no # more interim results received).