From e456a6bb233f0e67db800f05aa906f233e2acaeb Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Wed, 11 Mar 2026 17:17:40 -0400 Subject: [PATCH 1/4] Move away from remaining deprecated `TransportParams.vad_analyzer` usage in example files. Skip updates to deprecated services. --- .../foundational/07zk-interruptible-resemble.py | 8 ++------ examples/foundational/13-whisper-transcription.py | 7 +++---- examples/foundational/13a-whisper-local.py | 5 +++-- examples/foundational/13e-whisper-mlx.py | 9 +++++---- .../foundational/13g-sambanova-transcription.py | 9 +++++---- examples/foundational/13i-soniox-transcription.py | 7 +++---- examples/foundational/13j-azure-transcription.py | 7 +++---- .../foundational/13k-elevenlabs-transcription.py | 12 ++++++------ examples/foundational/13m-openai-transcription.py | 12 ++++++------ examples/foundational/19-openai-realtime.py | 9 +++++---- examples/foundational/19a-azure-realtime.py | 13 ++++++++----- examples/foundational/19b-openai-realtime-text.py | 13 ++++++++----- .../foundational/19c-openai-realtime-live-video.py | 12 ++++++++---- .../20b-persistent-context-openai-realtime.py | 13 ++++++++----- .../20e-persistent-context-aws-nova-sonic.py | 13 ++++++++----- examples/foundational/25-google-audio-in.py | 13 ++++++++----- examples/foundational/40-aws-nova-sonic.py | 9 +++++---- .../55zl-update-settings-azure-realtime.py | 9 +++++---- .../55zl-update-settings-openai-realtime.py | 9 +++++---- .../55zm-update-settings-gemini-live-vertex.py | 13 ++++++++----- .../55zm-update-settings-gemini-live.py | 13 ++++++++----- .../55zn-update-settings-ultravox-realtime.py | 9 +++++---- .../55zo-update-settings-grok-realtime.py | 9 +++++---- 23 files changed, 130 insertions(+), 103 deletions(-) diff --git a/examples/foundational/07zk-interruptible-resemble.py b/examples/foundational/07zk-interruptible-resemble.py index 88bcb724e..a62387815 100644 --- a/examples/foundational/07zk-interruptible-resemble.py +++ b/examples/foundational/07zk-interruptible-resemble.py @@ -30,24 +30,20 @@ from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams load_dotenv(override=True) -# We store functions so objects (e.g. SileroVADAnalyzer) don't get -# instantiated. The function will be called when the desired transport gets -# selected. +# We use lambdas to defer transport parameter creation until the transport +# type is selected at runtime. transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } diff --git a/examples/foundational/13-whisper-transcription.py b/examples/foundational/13-whisper-transcription.py index e2f0f61e0..f61cec132 100644 --- a/examples/foundational/13-whisper-transcription.py +++ b/examples/foundational/13-whisper-transcription.py @@ -13,6 +13,7 @@ from pipecat.frames.frames import Frame, TranscriptionFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask +from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -40,15 +41,12 @@ class TranscriptionLogger(FrameProcessor): transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -59,8 +57,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = WhisperSTTService() tl = TranscriptionLogger() + vad_processor = VADProcessor(vad_analyzer=SileroVADAnalyzer()) - pipeline = Pipeline([transport.input(), stt, tl]) + pipeline = Pipeline([transport.input(), vad_processor, stt, tl]) task = PipelineTask( pipeline, diff --git a/examples/foundational/13a-whisper-local.py b/examples/foundational/13a-whisper-local.py index ec9ddb603..0882542fc 100644 --- a/examples/foundational/13a-whisper-local.py +++ b/examples/foundational/13a-whisper-local.py @@ -15,6 +15,7 @@ from pipecat.frames.frames import Frame, TranscriptionFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask +from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.services.whisper.stt import WhisperSTTService from pipecat.transports.local.audio import LocalAudioTransport, LocalAudioTransportParams @@ -40,15 +41,15 @@ async def main(): transport = LocalAudioTransport( LocalAudioTransportParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ) ) stt = WhisperSTTService() tl = TranscriptionLogger() + vad_processor = VADProcessor(vad_analyzer=SileroVADAnalyzer()) - pipeline = Pipeline([transport.input(), stt, tl]) + pipeline = Pipeline([transport.input(), vad_processor, stt, tl]) task = PipelineTask(pipeline) diff --git a/examples/foundational/13e-whisper-mlx.py b/examples/foundational/13e-whisper-mlx.py index f4721a86a..af7d2d79e 100644 --- a/examples/foundational/13e-whisper-mlx.py +++ b/examples/foundational/13e-whisper-mlx.py @@ -15,6 +15,7 @@ from pipecat.frames.frames import Frame, TranscriptionFrame, UserStoppedSpeaking from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask +from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -61,15 +62,12 @@ class TranscriptionLogger(FrameProcessor): transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=STOP_SECS)), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=STOP_SECS)), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=STOP_SECS)), ), } @@ -84,8 +82,11 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) tl = TranscriptionLogger() + vad_processor = VADProcessor( + vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=STOP_SECS)) + ) - pipeline = Pipeline([transport.input(), stt, tl]) + pipeline = Pipeline([transport.input(), vad_processor, stt, tl]) task = PipelineTask( pipeline, diff --git a/examples/foundational/13g-sambanova-transcription.py b/examples/foundational/13g-sambanova-transcription.py index 404c215fd..26e961c5e 100644 --- a/examples/foundational/13g-sambanova-transcription.py +++ b/examples/foundational/13g-sambanova-transcription.py @@ -16,6 +16,7 @@ from pipecat.frames.frames import Frame, TranscriptionFrame, UserStoppedSpeaking from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask +from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -62,15 +63,12 @@ class TranscriptionLogger(FrameProcessor): transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=STOP_SECS)), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=STOP_SECS)), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=STOP_SECS)), ), } @@ -86,8 +84,11 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) tl = TranscriptionLogger() + vad_processor = VADProcessor( + vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=STOP_SECS)) + ) - pipeline = Pipeline([transport.input(), stt, tl]) + pipeline = Pipeline([transport.input(), vad_processor, stt, tl]) task = PipelineTask( pipeline, diff --git a/examples/foundational/13i-soniox-transcription.py b/examples/foundational/13i-soniox-transcription.py index d8d46dfc3..9476e9441 100644 --- a/examples/foundational/13i-soniox-transcription.py +++ b/examples/foundational/13i-soniox-transcription.py @@ -14,6 +14,7 @@ from pipecat.frames.frames import Frame, TranscriptionFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask +from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -39,15 +40,12 @@ class TranscriptionLogger(FrameProcessor): transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -60,8 +58,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) tl = TranscriptionLogger() + vad_processor = VADProcessor(vad_analyzer=SileroVADAnalyzer()) - pipeline = Pipeline([transport.input(), stt, tl]) + pipeline = Pipeline([transport.input(), vad_processor, stt, tl]) task = PipelineTask( pipeline, diff --git a/examples/foundational/13j-azure-transcription.py b/examples/foundational/13j-azure-transcription.py index d3df106bd..301c6effd 100644 --- a/examples/foundational/13j-azure-transcription.py +++ b/examples/foundational/13j-azure-transcription.py @@ -14,6 +14,7 @@ from pipecat.frames.frames import Frame, TranscriptionFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask +from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -39,15 +40,12 @@ class TranscriptionLogger(FrameProcessor): transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -61,8 +59,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) tl = TranscriptionLogger() + vad_processor = VADProcessor(vad_analyzer=SileroVADAnalyzer()) - pipeline = Pipeline([transport.input(), stt, tl]) + pipeline = Pipeline([transport.input(), vad_processor, stt, tl]) task = PipelineTask( pipeline, diff --git a/examples/foundational/13k-elevenlabs-transcription.py b/examples/foundational/13k-elevenlabs-transcription.py index f801944e5..dbfd32ec6 100644 --- a/examples/foundational/13k-elevenlabs-transcription.py +++ b/examples/foundational/13k-elevenlabs-transcription.py @@ -14,6 +14,7 @@ from pipecat.frames.frames import Frame, TranscriptionFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask +from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -39,11 +40,9 @@ class TranscriptionLogger(FrameProcessor): # We use lambdas to defer transport parameter creation until the transport # type is selected at runtime. transport_params = { - "daily": lambda: DailyParams(audio_in_enabled=True, vad_analyzer=SileroVADAnalyzer()), - "twilio": lambda: FastAPIWebsocketParams( - audio_in_enabled=True, vad_analyzer=SileroVADAnalyzer() - ), - "webrtc": lambda: TransportParams(audio_in_enabled=True, vad_analyzer=SileroVADAnalyzer()), + "daily": lambda: DailyParams(audio_in_enabled=True), + "twilio": lambda: FastAPIWebsocketParams(audio_in_enabled=True), + "webrtc": lambda: TransportParams(audio_in_enabled=True), } @@ -53,8 +52,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): stt = ElevenLabsRealtimeSTTService(api_key=os.getenv("ELEVENLABS_API_KEY")) tl = TranscriptionLogger() + vad_processor = VADProcessor(vad_analyzer=SileroVADAnalyzer()) - pipeline = Pipeline([transport.input(), stt, tl]) + pipeline = Pipeline([transport.input(), vad_processor, stt, tl]) task = PipelineTask( pipeline, diff --git a/examples/foundational/13m-openai-transcription.py b/examples/foundational/13m-openai-transcription.py index 0fb595881..cbbf0e13d 100644 --- a/examples/foundational/13m-openai-transcription.py +++ b/examples/foundational/13m-openai-transcription.py @@ -14,6 +14,7 @@ from pipecat.frames.frames import Frame, TranscriptionFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineTask +from pipecat.processors.audio.vad_processor import VADProcessor from pipecat.processors.frame_processor import FrameDirection, FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -39,11 +40,9 @@ class TranscriptionLogger(FrameProcessor): # We use lambdas to defer transport parameter creation until the transport # type is selected at runtime. transport_params = { - "daily": lambda: DailyParams(audio_in_enabled=True, vad_analyzer=SileroVADAnalyzer()), - "twilio": lambda: FastAPIWebsocketParams( - audio_in_enabled=True, vad_analyzer=SileroVADAnalyzer() - ), - "webrtc": lambda: TransportParams(audio_in_enabled=True, vad_analyzer=SileroVADAnalyzer()), + "daily": lambda: DailyParams(audio_in_enabled=True), + "twilio": lambda: FastAPIWebsocketParams(audio_in_enabled=True), + "webrtc": lambda: TransportParams(audio_in_enabled=True), } @@ -59,8 +58,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) tl = TranscriptionLogger() + vad_processor = VADProcessor(vad_analyzer=SileroVADAnalyzer()) - pipeline = Pipeline([transport.input(), stt, tl]) + pipeline = Pipeline([transport.input(), vad_processor, stt, tl]) task = PipelineTask( pipeline, diff --git a/examples/foundational/19-openai-realtime.py b/examples/foundational/19-openai-realtime.py index 8eeea9e02..cb3abf953 100644 --- a/examples/foundational/19-openai-realtime.py +++ b/examples/foundational/19-openai-realtime.py @@ -24,6 +24,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import ( AssistantTurnStoppedMessage, LLMContextAggregatorPair, + LLMUserAggregatorParams, UserTurnStoppedMessage, ) from pipecat.runner.types import RunnerArguments @@ -119,17 +120,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -187,7 +185,10 @@ Remember, your responses should be short. Just one or two sentences, usually. Re tools, ) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/19a-azure-realtime.py b/examples/foundational/19a-azure-realtime.py index c98dc167a..ffba20f5d 100644 --- a/examples/foundational/19a-azure-realtime.py +++ b/examples/foundational/19a-azure-realtime.py @@ -19,7 +19,10 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext -from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair +from pipecat.processors.aggregators.llm_response_universal import ( + LLMContextAggregatorPair, + LLMUserAggregatorParams, +) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.azure.realtime.llm import AzureRealtimeLLMService @@ -93,17 +96,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -172,7 +172,10 @@ Remember, your responses should be short. Just one or two sentences, usually. Re tools, ) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/19b-openai-realtime-text.py b/examples/foundational/19b-openai-realtime-text.py index deb50e805..1fa6ea545 100644 --- a/examples/foundational/19b-openai-realtime-text.py +++ b/examples/foundational/19b-openai-realtime-text.py @@ -19,7 +19,10 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext -from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair +from pipecat.processors.aggregators.llm_response_universal import ( + LLMContextAggregatorPair, + LLMUserAggregatorParams, +) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.cartesia.tts import CartesiaTTSService @@ -98,17 +101,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -175,7 +175,10 @@ Remember, your responses should be short. Just one or two sentences, usually. Re tools, ) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/19c-openai-realtime-live-video.py b/examples/foundational/19c-openai-realtime-live-video.py index 3038a57bc..f862b5511 100644 --- a/examples/foundational/19c-openai-realtime-live-video.py +++ b/examples/foundational/19c-openai-realtime-live-video.py @@ -17,7 +17,10 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext -from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair +from pipecat.processors.aggregators.llm_response_universal import ( + LLMContextAggregatorPair, + LLMUserAggregatorParams, +) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import ( create_transport, @@ -46,13 +49,11 @@ transport_params = { audio_in_enabled=True, audio_out_enabled=True, video_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, video_in_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -103,7 +104,10 @@ Remember, your responses should be short. Just one or two sentences, usually. Re [{"role": "user", "content": "Say hello!"}], ) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/20b-persistent-context-openai-realtime.py b/examples/foundational/20b-persistent-context-openai-realtime.py index 2b9a8b6bf..de4215ab8 100644 --- a/examples/foundational/20b-persistent-context-openai-realtime.py +++ b/examples/foundational/20b-persistent-context-openai-realtime.py @@ -21,7 +21,10 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext -from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair +from pipecat.processors.aggregators.llm_response_universal import ( + LLMContextAggregatorPair, + LLMUserAggregatorParams, +) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService @@ -153,17 +156,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -214,7 +214,10 @@ Remember, your responses should be short. Just one or two sentences, usually.""" llm.register_function("load_conversation", load_conversation) context = LLMContext([{"role": "user", "content": "Say hello!"}], tools) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/20e-persistent-context-aws-nova-sonic.py b/examples/foundational/20e-persistent-context-aws-nova-sonic.py index 9614328f2..3d1043d18 100644 --- a/examples/foundational/20e-persistent-context-aws-nova-sonic.py +++ b/examples/foundational/20e-persistent-context-aws-nova-sonic.py @@ -21,7 +21,10 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext -from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair +from pipecat.processors.aggregators.llm_response_universal import ( + LLMContextAggregatorPair, + LLMUserAggregatorParams, +) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService @@ -189,17 +192,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -236,7 +236,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): llm.register_function("load_conversation", load_conversation) context = LLMContext(tools=tools) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/25-google-audio-in.py b/examples/foundational/25-google-audio-in.py index 572e0e213..6b549a7fe 100644 --- a/examples/foundational/25-google-audio-in.py +++ b/examples/foundational/25-google-audio-in.py @@ -28,7 +28,10 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext -from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair +from pipecat.processors.aggregators.llm_response_universal import ( + LLMContextAggregatorPair, + LLMUserAggregatorParams, +) from pipecat.processors.frame_processor import FrameProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -270,17 +273,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -324,7 +324,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ] context = LLMContext(messages) - context_aggregator = LLMContextAggregatorPair(context) + context_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) audio_collector = UserAudioCollector(context, context_aggregator.user()) input_transcription_context_filter = InputTranscriptionContextFilter() transcription_frames_emitter = InputTranscriptionFrameEmitter() diff --git a/examples/foundational/40-aws-nova-sonic.py b/examples/foundational/40-aws-nova-sonic.py index 79a3d168c..6f7c745ce 100644 --- a/examples/foundational/40-aws-nova-sonic.py +++ b/examples/foundational/40-aws-nova-sonic.py @@ -24,6 +24,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import ( AssistantTurnStoppedMessage, LLMContextAggregatorPair, + LLMUserAggregatorParams, UserTurnStoppedMessage, ) from pipecat.runner.types import RunnerArguments @@ -87,17 +88,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -147,7 +145,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Set up context and context management. context = LLMContext(tools=tools) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) # Build the pipeline pipeline = Pipeline( diff --git a/examples/foundational/55zl-update-settings-azure-realtime.py b/examples/foundational/55zl-update-settings-azure-realtime.py index fcfcdcfdd..a977ea60c 100644 --- a/examples/foundational/55zl-update-settings-azure-realtime.py +++ b/examples/foundational/55zl-update-settings-azure-realtime.py @@ -19,6 +19,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import ( AssistantTurnStoppedMessage, LLMContextAggregatorPair, + LLMUserAggregatorParams, ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -34,17 +35,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -65,7 +63,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ] context = LLMContext(messages) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/55zl-update-settings-openai-realtime.py b/examples/foundational/55zl-update-settings-openai-realtime.py index 372b1f1e6..9f7281a72 100644 --- a/examples/foundational/55zl-update-settings-openai-realtime.py +++ b/examples/foundational/55zl-update-settings-openai-realtime.py @@ -19,6 +19,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import ( AssistantTurnStoppedMessage, LLMContextAggregatorPair, + LLMUserAggregatorParams, ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -34,17 +35,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -62,7 +60,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ] context = LLMContext(messages) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/55zm-update-settings-gemini-live-vertex.py b/examples/foundational/55zm-update-settings-gemini-live-vertex.py index 8ff18e1eb..c6a04347a 100644 --- a/examples/foundational/55zm-update-settings-gemini-live-vertex.py +++ b/examples/foundational/55zm-update-settings-gemini-live-vertex.py @@ -16,7 +16,10 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext -from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair +from pipecat.processors.aggregators.llm_response_universal import ( + LLMContextAggregatorPair, + LLMUserAggregatorParams, +) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.google.gemini_live.vertex.llm import GeminiLiveVertexLLMService @@ -30,17 +33,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -58,7 +58,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) context = LLMContext() - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/55zm-update-settings-gemini-live.py b/examples/foundational/55zm-update-settings-gemini-live.py index 0b88c45da..beb7f0c1c 100644 --- a/examples/foundational/55zm-update-settings-gemini-live.py +++ b/examples/foundational/55zm-update-settings-gemini-live.py @@ -16,7 +16,10 @@ from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_context import LLMContext -from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair +from pipecat.processors.aggregators.llm_response_universal import ( + LLMContextAggregatorPair, + LLMUserAggregatorParams, +) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService @@ -30,17 +33,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -56,7 +56,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ) context = LLMContext() - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/55zn-update-settings-ultravox-realtime.py b/examples/foundational/55zn-update-settings-ultravox-realtime.py index 13ce6c1ae..ccf2d2003 100644 --- a/examples/foundational/55zn-update-settings-ultravox-realtime.py +++ b/examples/foundational/55zn-update-settings-ultravox-realtime.py @@ -21,6 +21,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import ( AssistantTurnStoppedMessage, LLMContextAggregatorPair, + LLMUserAggregatorParams, ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -35,17 +36,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -73,7 +71,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ] context = LLMContext(messages) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ diff --git a/examples/foundational/55zo-update-settings-grok-realtime.py b/examples/foundational/55zo-update-settings-grok-realtime.py index 5ac425de4..60ba18755 100644 --- a/examples/foundational/55zo-update-settings-grok-realtime.py +++ b/examples/foundational/55zo-update-settings-grok-realtime.py @@ -19,6 +19,7 @@ from pipecat.processors.aggregators.llm_context import LLMContext from pipecat.processors.aggregators.llm_response_universal import ( AssistantTurnStoppedMessage, LLMContextAggregatorPair, + LLMUserAggregatorParams, ) from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport @@ -34,17 +35,14 @@ transport_params = { "daily": lambda: DailyParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "twilio": lambda: FastAPIWebsocketParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), "webrtc": lambda: TransportParams( audio_in_enabled=True, audio_out_enabled=True, - vad_analyzer=SileroVADAnalyzer(), ), } @@ -62,7 +60,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ] context = LLMContext(messages) - user_aggregator, assistant_aggregator = LLMContextAggregatorPair(context) + user_aggregator, assistant_aggregator = LLMContextAggregatorPair( + context, + user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()), + ) pipeline = Pipeline( [ From ccc2549c0cebed0ad65a8b13b978b7b7768161b8 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Wed, 11 Mar 2026 17:22:11 -0400 Subject: [PATCH 2/4] Broaden the `vad_analyzer` deprecation warning in `BaseInputTransport` to account for use-cases where there is no `LLMUserAggregator` at play --- src/pipecat/transports/base_input.py | 5 +++-- src/pipecat/transports/base_transport.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pipecat/transports/base_input.py b/src/pipecat/transports/base_input.py index 1da672ab7..bcd457564 100644 --- a/src/pipecat/transports/base_input.py +++ b/src/pipecat/transports/base_input.py @@ -150,8 +150,9 @@ class BaseInputTransport(FrameProcessor): with warnings.catch_warnings(): warnings.simplefilter("always") warnings.warn( - "Parameter 'vad_analyzer' is deprecated, use `LLMUserAggregator`'s new " - "`vad_analyzer` parameter instead.", + "Parameter 'vad_analyzer' is deprecated. Use `LLMUserAggregator`'s " + "`vad_analyzer` parameter, or `VADProcessor` if no `LLMUserAggregator` " + "is needed.", DeprecationWarning, ) diff --git a/src/pipecat/transports/base_transport.py b/src/pipecat/transports/base_transport.py index 7879976ba..a78e1046c 100644 --- a/src/pipecat/transports/base_transport.py +++ b/src/pipecat/transports/base_transport.py @@ -115,8 +115,9 @@ class TransportParams(BaseModel): vad_analyzer: Voice Activity Detection analyzer instance. .. deprecated:: 0.0.101 - The `vad_analyzer` parameter is deprecated, use `LLMUSerAggregator`'s - new `vad_analyzer` parameter instead. + The `vad_analyzer` parameter is deprecated. Use `LLMUserAggregator`'s + `vad_analyzer` parameter, or `VADProcessor` if no `LLMUserAggregator` + is needed. turn_analyzer: Turn-taking analyzer instance for conversation management. From 9a0568e6fe1e3b5afb56304c3067139fc3d152b3 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Wed, 11 Mar 2026 17:32:39 -0400 Subject: [PATCH 3/4] Add changelog for #4003 --- changelog/4003.changed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/4003.changed.md diff --git a/changelog/4003.changed.md b/changelog/4003.changed.md new file mode 100644 index 000000000..26269ba68 --- /dev/null +++ b/changelog/4003.changed.md @@ -0,0 +1 @@ +- The `TransportParams.vad_analyzer` deprecation warning now also suggests `VADProcessor` as an alternative for pipelines that don't use an `LLMUserAggregator`. From 69e7677f4f477e39d8c7257443d664e1a0dee089 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Wed, 11 Mar 2026 17:33:20 -0400 Subject: [PATCH 4/4] Remove changelog for #4003 --- changelog/4003.changed.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 changelog/4003.changed.md diff --git a/changelog/4003.changed.md b/changelog/4003.changed.md deleted file mode 100644 index 26269ba68..000000000 --- a/changelog/4003.changed.md +++ /dev/null @@ -1 +0,0 @@ -- The `TransportParams.vad_analyzer` deprecation warning now also suggests `VADProcessor` as an alternative for pipelines that don't use an `LLMUserAggregator`.