From 1d8abe3c1cc0fa8eaad138b4f23024fdd2559f41 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Fri, 1 Aug 2025 14:57:53 -0400 Subject: [PATCH] fix: LiveKitTransport, don't push empty AudioRawFrames --- CHANGELOG.md | 7 +++++++ src/pipecat/transports/services/livekit.py | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 685ae8481..d31a76c75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to **Pipecat** will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fixed an issue in `LiveKitTransport` where empty `AudioRawFrame`s were pushed + down the pipeline. This resulted in warnings by the STT processor. + ## [0.0.77] - 2025-07-31 ### Added diff --git a/src/pipecat/transports/services/livekit.py b/src/pipecat/transports/services/livekit.py index 37d08b02d..24c0b3cf0 100644 --- a/src/pipecat/transports/services/livekit.py +++ b/src/pipecat/transports/services/livekit.py @@ -605,6 +605,11 @@ class LiveKitInputTransport(BaseInputTransport): pipecat_audio_frame = await self._convert_livekit_audio_to_pipecat( audio_frame_event ) + + # Skip frames with no audio data + if len(pipecat_audio_frame.audio) == 0: + continue + input_audio_frame = UserAudioRawFrame( user_id=participant_id, audio=pipecat_audio_frame.audio,