diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c8a6c98..6b4296cc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ 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] +## [0.0.56] - 2025-02-06 ### Changed @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed a `TkLocalTransport` and `LocalAudioTransport` issues that was causing + errors on cleanup. + - Fixed an issue that was causing `tests.utils` import to fail because of logging setup. diff --git a/src/pipecat/transports/local/audio.py b/src/pipecat/transports/local/audio.py index 3801142e2..e8c8beaf4 100644 --- a/src/pipecat/transports/local/audio.py +++ b/src/pipecat/transports/local/audio.py @@ -53,9 +53,6 @@ async def cleanup(self): await super().cleanup() if self._in_stream: self._in_stream.stop_stream() - # This is not very pretty (taken from PyAudio docs). - while self._in_stream.is_active(): - await asyncio.sleep(0.1) self._in_stream.close() self._in_stream = None @@ -99,9 +96,6 @@ async def cleanup(self): await super().cleanup() if self._out_stream: self._out_stream.stop_stream() - # This is not very pretty (taken from PyAudio docs). - while self._out_stream.is_active(): - await asyncio.sleep(0.1) self._out_stream.close() async def write_raw_audio_frames(self, frames: bytes): diff --git a/src/pipecat/transports/local/tk.py b/src/pipecat/transports/local/tk.py index 78e89bc91..40147d39f 100644 --- a/src/pipecat/transports/local/tk.py +++ b/src/pipecat/transports/local/tk.py @@ -61,9 +61,6 @@ async def cleanup(self): await super().cleanup() if self._in_stream: self._in_stream.stop_stream() - # This is not very pretty (taken from PyAudio docs). - while self._in_stream.is_active(): - await asyncio.sleep(0.1) self._in_stream.close() def _audio_in_callback(self, in_data, frame_count, time_info, status): @@ -113,9 +110,6 @@ async def cleanup(self): await super().cleanup() if self._out_stream: self._out_stream.stop_stream() - # This is not very pretty (taken from PyAudio docs). - while self._out_stream.is_active(): - await asyncio.sleep(0.1) self._out_stream.close() async def write_raw_audio_frames(self, frames: bytes):