From f571da6795ea9606b739567d40174a648f9b6bdf Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 19 Mar 2026 01:32:43 +0700 Subject: [PATCH 1/3] Fixed SimliVideoService pushing near-silent audio constantly preventing BotStoppedSpeaking --- changelog/9999.fixed.md | 1 + src/pipecat/services/simli/video.py | 5 +++-- .../turns/user_stop/llm_based_user_turn_stop_strategy.py | 0 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog/9999.fixed.md create mode 100644 src/pipecat/turns/user_stop/llm_based_user_turn_stop_strategy.py diff --git a/changelog/9999.fixed.md b/changelog/9999.fixed.md new file mode 100644 index 0000000000..ffde7dd07a --- /dev/null +++ b/changelog/9999.fixed.md @@ -0,0 +1 @@ +Fixed SimliVideoService forwarding near-silent audio frames (quantization noise) as TTSAudioRawFrame. Added RMS threshold check to skip frames below 1.0, which is well above the observed noise floor (~0.41) but far below real speech. Without this fix - BotStoppedSpeaking will never trigger. \ No newline at end of file diff --git a/src/pipecat/services/simli/video.py b/src/pipecat/services/simli/video.py index f994ef0dc3..9aa56bef90 100644 --- a/src/pipecat/services/simli/video.py +++ b/src/pipecat/services/simli/video.py @@ -261,8 +261,9 @@ async def _consume_and_process_audio(self): resampled_frames = self._pipecat_resampler.resample(audio_frame) for resampled_frame in resampled_frames: audio_array = resampled_frame.to_ndarray() - # Only push frame is there is audio (e.g. not silence) - if audio_array.any(): + # Simli pushes very low volume (total silence for practical purposes) frames when the avatar is not speaking, so we can skip otherwise BotStoppedSpeaking will never trigger. + rms = np.sqrt(np.mean(audio_array.astype(np.float32) ** 2)) + if rms >= 1.0: await self.push_frame( TTSAudioRawFrame( audio=audio_array.tobytes(), diff --git a/src/pipecat/turns/user_stop/llm_based_user_turn_stop_strategy.py b/src/pipecat/turns/user_stop/llm_based_user_turn_stop_strategy.py new file mode 100644 index 0000000000..e69de29bb2 From 39a37f1e611c0a59d23cdb888480d9cd590ff35d Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 19 Mar 2026 01:35:42 +0700 Subject: [PATCH 2/3] Fixed changelog number --- changelog/{9999.fixed.md => 4076.fixed.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog/{9999.fixed.md => 4076.fixed.md} (100%) diff --git a/changelog/9999.fixed.md b/changelog/4076.fixed.md similarity index 100% rename from changelog/9999.fixed.md rename to changelog/4076.fixed.md From 52c60cfc82949c9928154e54fb9104ba43d99c21 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 19 Mar 2026 01:38:13 +0700 Subject: [PATCH 3/3] Removed an unnecessary file accidentally added --- src/pipecat/turns/user_stop/llm_based_user_turn_stop_strategy.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/pipecat/turns/user_stop/llm_based_user_turn_stop_strategy.py diff --git a/src/pipecat/turns/user_stop/llm_based_user_turn_stop_strategy.py b/src/pipecat/turns/user_stop/llm_based_user_turn_stop_strategy.py deleted file mode 100644 index e69de29bb2..0000000000