From bd760deff284d3eafa5d742d0b57dffb7272a842 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Wed, 17 Sep 2025 16:19:31 -0400 Subject: [PATCH] Update comment with more detail for posterity --- src/pipecat/pipeline/service_switcher.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pipecat/pipeline/service_switcher.py b/src/pipecat/pipeline/service_switcher.py index 985f59b3a..64920e0ce 100644 --- a/src/pipecat/pipeline/service_switcher.py +++ b/src/pipecat/pipeline/service_switcher.py @@ -169,6 +169,11 @@ class ServiceSwitcher(ParallelPipeline, Generic[StrategyType]): service_switcher_filter_frame = ServiceSwitcher.ServiceSwitcherFilterFrame( active_service=self.strategy.active_service ) - # Hack: we need access ParallelPipeline internals here to queue the frame in each of the pipelines + # Hack: we need access ParallelPipeline internals here to queue the + # frame in each of the pipelines. + # Why not just call super().process_frame(service_switcher_filter_frame, direction), + # you ask? Because that would also send this internal-only frame + # down the "main" pipeline instead of only down the individual + # branches of the parallel pipeline, which we want to avoid. for p in self._pipelines: await p.queue_frame(service_switcher_filter_frame, direction)