diff --git a/examples/foundational/07zb-interruptible-inworld-http.py b/examples/foundational/07zb-interruptible-inworld-http.py index b2bf05660..c67984f7c 100644 --- a/examples/foundational/07zb-interruptible-inworld-http.py +++ b/examples/foundational/07zb-interruptible-inworld-http.py @@ -23,7 +23,6 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.processors.frameworks.rtvi import RTVIObserver, RTVIProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService @@ -93,12 +92,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ), ) - rtvi = RTVIProcessor() - pipeline = Pipeline( [ transport.input(), - rtvi, stt, user_aggregator, llm, @@ -115,7 +111,6 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): enable_usage_metrics=True, ), observers=[ - RTVIObserver(rtvi), DebugLogObserver( frame_types={ TTSTextFrame: (BaseOutputTransport, FrameEndpoint.SOURCE), diff --git a/examples/foundational/07zb-interruptible-inworld.py b/examples/foundational/07zb-interruptible-inworld.py index 8d3d351a5..46e07dc5f 100644 --- a/examples/foundational/07zb-interruptible-inworld.py +++ b/examples/foundational/07zb-interruptible-inworld.py @@ -22,7 +22,6 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.processors.frameworks.rtvi import RTVIConfig, RTVIObserver, RTVIProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService @@ -88,12 +87,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ), ) - rtvi = RTVIProcessor(config=RTVIConfig(config=[])) - pipeline = Pipeline( [ transport.input(), - rtvi, stt, user_aggregator, llm, @@ -110,7 +106,6 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): enable_usage_metrics=True, ), observers=[ - RTVIObserver(rtvi), DebugLogObserver( frame_types={ TTSTextFrame: (BaseOutputTransport, FrameEndpoint.SOURCE), diff --git a/examples/foundational/07ze-interruptible-hume.py b/examples/foundational/07ze-interruptible-hume.py index 33ea4d278..e9a8e355c 100644 --- a/examples/foundational/07ze-interruptible-hume.py +++ b/examples/foundational/07ze-interruptible-hume.py @@ -22,7 +22,6 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.processors.frameworks.rtvi import RTVIConfig, RTVIObserver, RTVIProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService @@ -90,12 +89,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ), ) - rtvi = RTVIProcessor(config=RTVIConfig(config=[])) - pipeline = Pipeline( [ transport.input(), # Transport user input - rtvi, stt, user_aggregator, # User responses llm, # LLM @@ -114,7 +110,6 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ), idle_timeout_secs=runner_args.pipeline_idle_timeout_secs, observers=[ - RTVIObserver(rtvi), DebugLogObserver( frame_types={ TTSTextFrame: (BaseOutputTransport, FrameEndpoint.SOURCE), @@ -123,10 +118,6 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ], ) - @rtvi.event_handler("on_client_ready") - async def on_client_ready(rtvi): - await rtvi.set_bot_ready() - @transport.event_handler("on_client_connected") async def on_client_connected(transport, client): logger.info(f"Client connected") diff --git a/examples/foundational/37-mem0.py b/examples/foundational/37-mem0.py index c82d39edc..08a739c0a 100644 --- a/examples/foundational/37-mem0.py +++ b/examples/foundational/37-mem0.py @@ -59,7 +59,6 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.processors.frameworks.rtvi import RTVIConfig, RTVIObserver, RTVIProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.deepgram.stt import DeepgramSTTService @@ -255,12 +254,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ), ), ) - rtvi = RTVIProcessor(config=RTVIConfig(config=[])) pipeline = Pipeline( [ transport.input(), - rtvi, stt, user_aggregator, memory, @@ -278,12 +275,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): enable_usage_metrics=True, ), idle_timeout_secs=runner_args.pipeline_idle_timeout_secs, - observers=[RTVIObserver(rtvi)], ) - @rtvi.event_handler("on_client_ready") + @task.rtvi.event_handler("on_client_ready") async def on_client_ready(rtvi): - await rtvi.set_bot_ready() # Get personalized greeting based on user memories. Can pass agent_id and run_id as per requirement of the application to manage short term memory or agent specific memory. greeting = await get_initial_greeting( memory_client=memory.memory_client, user_id=USER_ID, agent_id=None, run_id=None diff --git a/examples/foundational/38b-smart-turn-local.py b/examples/foundational/38b-smart-turn-local.py index 37112de4d..85a320631 100644 --- a/examples/foundational/38b-smart-turn-local.py +++ b/examples/foundational/38b-smart-turn-local.py @@ -22,7 +22,6 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMContextAggregatorPair, LLMUserAggregatorParams, ) -from pipecat.processors.frameworks.rtvi import RTVIObserver, RTVIProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.cartesia.tts import CartesiaTTSService @@ -87,8 +86,6 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): ), ) - rtvi = RTVIProcessor() - pipeline = Pipeline( [ transport.input(), # Transport user input @@ -108,13 +105,11 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): enable_metrics=True, enable_usage_metrics=True, ), - observers=[RTVIObserver(rtvi)], idle_timeout_secs=runner_args.pipeline_idle_timeout_secs, ) - @rtvi.event_handler("on_client_ready") + @task.rtvi.event_handler("on_client_ready") async def on_client_ready(rtvi): - await rtvi.set_bot_ready() # Kick off the conversation messages.append({"role": "system", "content": "Please introduce yourself to the user."}) await task.queue_frames([LLMRunFrame()]) diff --git a/examples/foundational/46-video-processing.py b/examples/foundational/46-video-processing.py index c35843eab..bb3d57f04 100644 --- a/examples/foundational/46-video-processing.py +++ b/examples/foundational/46-video-processing.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2025, Daily +# Copyright (c) 2024-2026, Daily # # SPDX-License-Identifier: BSD 2-Clause License # @@ -22,7 +22,6 @@ from pipecat.processors.aggregators.llm_response_universal import ( LLMUserAggregatorParams, ) from pipecat.processors.frame_processor import FrameDirection, FrameProcessor -from pipecat.processors.frameworks.rtvi import RTVIObserver, RTVIProcessor from pipecat.runner.types import RunnerArguments from pipecat.runner.utils import create_transport from pipecat.services.google.gemini_live.llm import GeminiLiveLLMService @@ -125,14 +124,10 @@ async def run_bot(pipecat_transport): ), ) - # RTVI events for Pipecat client UI - rtvi = RTVIProcessor() - pipeline = Pipeline( [ pipecat_transport.input(), user_aggregator, - rtvi, llm, # LLM EdgeDetectionProcessor( pipecat_transport._params.video_out_width, @@ -149,13 +144,11 @@ async def run_bot(pipecat_transport): enable_metrics=True, enable_usage_metrics=True, ), - observers=[RTVIObserver(rtvi)], ) - @rtvi.event_handler("on_client_ready") + @task.rtvi.event_handler("on_client_ready") async def on_client_ready(rtvi): logger.info("Pipecat client ready.") - await rtvi.set_bot_ready() # Kick off the conversation. await task.queue_frames([LLMRunFrame()])