From a1450054986dc0e94915d12a5b602d5438fd71e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 30 Jan 2025 13:13:02 -0800 Subject: [PATCH] SyncParallelPipeline: cleanup source/sink processors --- src/pipecat/pipeline/sync_parallel_pipeline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pipecat/pipeline/sync_parallel_pipeline.py b/src/pipecat/pipeline/sync_parallel_pipeline.py index 083e992ca..2870a470d 100644 --- a/src/pipecat/pipeline/sync_parallel_pipeline.py +++ b/src/pipecat/pipeline/sync_parallel_pipeline.py @@ -105,7 +105,9 @@ class SyncParallelPipeline(BasePipeline): async def cleanup(self): await super().cleanup() + await asyncio.gather(*[s["processor"].cleanup() for s in self._sources]) await asyncio.gather(*[p.cleanup() for p in self._pipelines]) + await asyncio.gather(*[s["processor"].cleanup() for s in self._sinks]) async def process_frame(self, frame: Frame, direction: FrameDirection): await super().process_frame(frame, direction)