From 4c8fcb2cfce0ee6fc66d14ee749852fe3aee07df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Mon, 13 Jan 2025 13:27:04 -0800 Subject: [PATCH] pipeline(task): cleanup Sink processor Fixes #953 --- CHANGELOG.md | 27 +++++++++++++++++++-------- src/pipecat/pipeline/task.py | 1 + 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ad18922f..2c8fbb86a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,13 +20,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `enable_prejoin_ui`, `max_participants` and `start_video_off` params to `DailyRoomProperties`. -- Added `session_timeout` to `FastAPIWebsocketTransport` and `WebsocketServerTransport` - for configuring session timeouts (in seconds). Triggers `on_session_timeout` for custom timeout handling. +- Added `session_timeout` to `FastAPIWebsocketTransport` and + `WebsocketServerTransport` for configuring session timeouts (in + seconds). Triggers `on_session_timeout` for custom timeout handling. See [examples/websocket-server/bot.py](https://github.com/pipecat-ai/pipecat/blob/main/examples/websocket-server/bot.py). -- Added the new modalities option and helper function to set Gemini output modalities. +- Added the new modalities option and helper function to set Gemini output + modalities. -- Added `examples/foundational/26d-gemini-multimodal-live-text.py` which is using Gemini as TEXT modality and using another TTS provider for TTS process. +- Added `examples/foundational/26d-gemini-multimodal-live-text.py` which is + using Gemini as TEXT modality and using another TTS provider for TTS process. ### Changed @@ -34,14 +37,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Changed the default model for `PlayHTHttpTTSService` to `Play3.0-mini-http`. -- api_key, aws_access_key_id and region are no longer required parameters for the PollyTTSService (AWSTTSService) +- `api_key`, `aws_access_key_id` and `region` are no longer required parameters + for the PollyTTSService (AWSTTSService) -- Added `session_timeout` example in `examples/websocket-server/bot.py` to handle session timeout event. +- Added `session_timeout` example in `examples/websocket-server/bot.py` to + handle session timeout event. -- Changed `InputParams` in `src/pipecat/services/gemini_multimodal_live/gemini.py` to support different modalities. +- Changed `InputParams` in + `src/pipecat/services/gemini_multimodal_live/gemini.py` to support different + modalities. ### Fixed +- Fixed a `PipelineTask` issue that would cause a dangling task after stopping + the pipeline with an `EndFrame`. + - Fixed an import issue for `PlayHTHttpTTSService`. - Fixed an issue where languages couldn't be used with the `PlayHTHttpTTSService`. @@ -49,7 +59,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed an issue where `OpenAIRealtimeBetaLLMService` audio chunks were hitting an error when truncating audio content. -- Fixed an issue where setting the voice and model for `RimeHttpTTSService` wasn't working. +- Fixed an issue where setting the voice and model for `RimeHttpTTSService` + wasn't working. ## [0.0.52] - 2024-12-24 diff --git a/src/pipecat/pipeline/task.py b/src/pipecat/pipeline/task.py index f97b2c491..79a708c74 100644 --- a/src/pipecat/pipeline/task.py +++ b/src/pipecat/pipeline/task.py @@ -180,6 +180,7 @@ class PipelineTask: if should_cleanup: await self._source.cleanup() await self._pipeline.cleanup() + await self._sink.cleanup() # We just enqueue None to terminate the task gracefully. self._process_up_task.cancel() await self._process_up_task