From e86b55e2b3a5b08715819ea6cc91c57c916e1c65 Mon Sep 17 00:00:00 2001 From: Filipi Fuchter Date: Fri, 25 Jul 2025 17:01:41 -0300 Subject: [PATCH] Fixed an issue in `AudioBufferProcessor` when using `SmallWebRTCTransport` where, if the microphone was muted, track timing was not respected. --- CHANGELOG.md | 3 +++ src/pipecat/transports/network/webrtc_connection.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 020489822..ec4423f7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,6 +71,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed an issue in `AudioBufferProcessor` when using `SmallWebRTCTransport` where, if + the microphone was muted, track timing was not respected. + - Fixed an issue in `AudioBufferProcessor` that caused garbled audio when `enable_turn_audio` was enabled and audio resampling was required. diff --git a/src/pipecat/transports/network/webrtc_connection.py b/src/pipecat/transports/network/webrtc_connection.py index e08d678e5..e62195d4f 100644 --- a/src/pipecat/transports/network/webrtc_connection.py +++ b/src/pipecat/transports/network/webrtc_connection.py @@ -137,9 +137,9 @@ class SmallWebRTCTrack: """Receive the next frame from the track. Returns: - The next frame if the track is enabled, None otherwise. + The next frame, except for video tracks, where it returns the frame only if the track is enabled, otherwise, returns None. """ - if not self._enabled: + if not self._enabled and self._track.kind == "video": return None return await self._track.recv()