diff --git a/CHANGELOG.md b/CHANGELOG.md index 21abadaee..c30bc3594 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ 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 + +- Added real-time throttling to the `BaseOutputTransport` when using audio mixer + to ensure audio frames (including silence) are emitted at the correct intervals. + This prevents unnecessary CPU usage and avoids flooding the output with silent + frames when no new audio is available. + ## [0.0.66] - 2025-05-02 ### Added diff --git a/src/pipecat/transports/base_output.py b/src/pipecat/transports/base_output.py index a5264f622..1ee5cf5bf 100644 --- a/src/pipecat/transports/base_output.py +++ b/src/pipecat/transports/base_output.py @@ -436,7 +436,7 @@ class BaseOutputTransport(FrameProcessor): last_frame_time = 0 silence = b"\x00" * self._audio_chunk_size # chunk duration in seconds - chunk_duration = ( 10 * self._params.audio_out_10ms_chunks ) / 1000.0 + chunk_duration = (10 * self._params.audio_out_10ms_chunks) / 1000.0 next_frame_time = time.time() while True: try: