diff --git a/examples/foundational/03-still-frame.py b/examples/foundational/03-still-frame.py index bdb0f1d30..34c5da3b0 100644 --- a/examples/foundational/03-still-frame.py +++ b/examples/foundational/03-still-frame.py @@ -62,11 +62,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/03b-still-frame-imagen.py b/examples/foundational/03b-still-frame-imagen.py index 1ce177312..7042bd078 100644 --- a/examples/foundational/03b-still-frame-imagen.py +++ b/examples/foundational/03b-still-frame-imagen.py @@ -62,11 +62,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/04-transports-small-webrtc.py b/examples/foundational/04-transports-small-webrtc.py index 3d512c06e..c70b566d4 100644 --- a/examples/foundational/04-transports-small-webrtc.py +++ b/examples/foundational/04-transports-small-webrtc.py @@ -112,11 +112,6 @@ async def run_example(webrtc_connection: SmallWebRTCConnection): logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=False) await runner.run(task) diff --git a/examples/foundational/05-sync-speech-and-image.py b/examples/foundational/05-sync-speech-and-image.py index 22e600912..a87869d0b 100644 --- a/examples/foundational/05-sync-speech-and-image.py +++ b/examples/foundational/05-sync-speech-and-image.py @@ -168,11 +168,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - # Run the pipeline runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/06-listen-and-respond.py b/examples/foundational/06-listen-and-respond.py index 11d9fb3c5..5bdcd4b77 100644 --- a/examples/foundational/06-listen-and-respond.py +++ b/examples/foundational/06-listen-and-respond.py @@ -132,11 +132,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/06a-image-sync.py b/examples/foundational/06a-image-sync.py index 527c997c7..baabd1a56 100644 --- a/examples/foundational/06a-image-sync.py +++ b/examples/foundational/06a-image-sync.py @@ -151,11 +151,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07-interruptible-cartesia-http.py b/examples/foundational/07-interruptible-cartesia-http.py index 0ef8946b8..c0108d8f4 100644 --- a/examples/foundational/07-interruptible-cartesia-http.py +++ b/examples/foundational/07-interruptible-cartesia-http.py @@ -103,11 +103,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07-interruptible.py b/examples/foundational/07-interruptible.py index 439c59691..a86651c85 100644 --- a/examples/foundational/07-interruptible.py +++ b/examples/foundational/07-interruptible.py @@ -102,11 +102,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07b-interruptible-langchain.py b/examples/foundational/07b-interruptible-langchain.py index f003a065d..de1b12fea 100644 --- a/examples/foundational/07b-interruptible-langchain.py +++ b/examples/foundational/07b-interruptible-langchain.py @@ -135,11 +135,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07c-interruptible-deepgram-vad.py b/examples/foundational/07c-interruptible-deepgram-vad.py index ebf7679bd..53697283e 100644 --- a/examples/foundational/07c-interruptible-deepgram-vad.py +++ b/examples/foundational/07c-interruptible-deepgram-vad.py @@ -114,11 +114,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07c-interruptible-deepgram.py b/examples/foundational/07c-interruptible-deepgram.py index 2820bef5f..8eaea32e6 100644 --- a/examples/foundational/07c-interruptible-deepgram.py +++ b/examples/foundational/07c-interruptible-deepgram.py @@ -100,11 +100,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07d-interruptible-elevenlabs-http.py b/examples/foundational/07d-interruptible-elevenlabs-http.py index 38ac95917..7f76dbdcd 100644 --- a/examples/foundational/07d-interruptible-elevenlabs-http.py +++ b/examples/foundational/07d-interruptible-elevenlabs-http.py @@ -107,11 +107,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07d-interruptible-elevenlabs.py b/examples/foundational/07d-interruptible-elevenlabs.py index 7231e2130..a8a004417 100644 --- a/examples/foundational/07d-interruptible-elevenlabs.py +++ b/examples/foundational/07d-interruptible-elevenlabs.py @@ -103,11 +103,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07e-interruptible-playht-http.py b/examples/foundational/07e-interruptible-playht-http.py index 8655f80d9..0662ea27a 100644 --- a/examples/foundational/07e-interruptible-playht-http.py +++ b/examples/foundational/07e-interruptible-playht-http.py @@ -103,11 +103,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07e-interruptible-playht.py b/examples/foundational/07e-interruptible-playht.py index 7233ffd88..b5c96c689 100644 --- a/examples/foundational/07e-interruptible-playht.py +++ b/examples/foundational/07e-interruptible-playht.py @@ -105,11 +105,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07f-interruptible-azure.py b/examples/foundational/07f-interruptible-azure.py index 01a6ab9c6..32f97fb2e 100644 --- a/examples/foundational/07f-interruptible-azure.py +++ b/examples/foundational/07f-interruptible-azure.py @@ -109,11 +109,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07g-interruptible-openai.py b/examples/foundational/07g-interruptible-openai.py index 44f435538..203556e99 100644 --- a/examples/foundational/07g-interruptible-openai.py +++ b/examples/foundational/07g-interruptible-openai.py @@ -104,11 +104,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07h-interruptible-openpipe.py b/examples/foundational/07h-interruptible-openpipe.py index 546329c6f..a73a78eb0 100644 --- a/examples/foundational/07h-interruptible-openpipe.py +++ b/examples/foundational/07h-interruptible-openpipe.py @@ -108,11 +108,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07i-interruptible-xtts.py b/examples/foundational/07i-interruptible-xtts.py index 8a502866e..0efe516f2 100644 --- a/examples/foundational/07i-interruptible-xtts.py +++ b/examples/foundational/07i-interruptible-xtts.py @@ -106,11 +106,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07j-interruptible-gladia.py b/examples/foundational/07j-interruptible-gladia.py index e375a5f25..38b0f506e 100644 --- a/examples/foundational/07j-interruptible-gladia.py +++ b/examples/foundational/07j-interruptible-gladia.py @@ -111,11 +111,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07k-interruptible-lmnt.py b/examples/foundational/07k-interruptible-lmnt.py index 80f1b05ca..f7fc4b8aa 100644 --- a/examples/foundational/07k-interruptible-lmnt.py +++ b/examples/foundational/07k-interruptible-lmnt.py @@ -99,11 +99,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07l-interruptible-groq.py b/examples/foundational/07l-interruptible-groq.py index ea9674d0d..d649ddce8 100644 --- a/examples/foundational/07l-interruptible-groq.py +++ b/examples/foundational/07l-interruptible-groq.py @@ -103,11 +103,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07m-interruptible-aws.py b/examples/foundational/07m-interruptible-aws.py index 15302ed99..dbdd0ba40 100644 --- a/examples/foundational/07m-interruptible-aws.py +++ b/examples/foundational/07m-interruptible-aws.py @@ -106,11 +106,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07n-interruptible-google.py b/examples/foundational/07n-interruptible-google.py index c9968c7f4..30d09943a 100644 --- a/examples/foundational/07n-interruptible-google.py +++ b/examples/foundational/07n-interruptible-google.py @@ -107,11 +107,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07o-interruptible-assemblyai.py b/examples/foundational/07o-interruptible-assemblyai.py index 37d036720..0e195fa57 100644 --- a/examples/foundational/07o-interruptible-assemblyai.py +++ b/examples/foundational/07o-interruptible-assemblyai.py @@ -105,11 +105,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07p-interruptible-krisp.py b/examples/foundational/07p-interruptible-krisp.py index 25eed7e85..57cc0910e 100644 --- a/examples/foundational/07p-interruptible-krisp.py +++ b/examples/foundational/07p-interruptible-krisp.py @@ -103,11 +103,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07q-interruptible-rime-http.py b/examples/foundational/07q-interruptible-rime-http.py index 6a6fea9f2..248214d1a 100644 --- a/examples/foundational/07q-interruptible-rime-http.py +++ b/examples/foundational/07q-interruptible-rime-http.py @@ -108,11 +108,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07q-interruptible-rime.py b/examples/foundational/07q-interruptible-rime.py index b63be92f4..cdc083b2e 100644 --- a/examples/foundational/07q-interruptible-rime.py +++ b/examples/foundational/07q-interruptible-rime.py @@ -102,11 +102,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07r-interruptible-riva-nim.py b/examples/foundational/07r-interruptible-riva-nim.py index 198606fec..f93809d03 100644 --- a/examples/foundational/07r-interruptible-riva-nim.py +++ b/examples/foundational/07r-interruptible-riva-nim.py @@ -99,11 +99,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07s-interruptible-google-audio-in.py b/examples/foundational/07s-interruptible-google-audio-in.py index ed9c5db5e..eeb4d6c48 100644 --- a/examples/foundational/07s-interruptible-google-audio-in.py +++ b/examples/foundational/07s-interruptible-google-audio-in.py @@ -276,11 +276,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07t-interruptible-fish.py b/examples/foundational/07t-interruptible-fish.py index 55f3a5fff..48c02d33c 100644 --- a/examples/foundational/07t-interruptible-fish.py +++ b/examples/foundational/07t-interruptible-fish.py @@ -103,11 +103,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07u-interruptible-ultravox.py b/examples/foundational/07u-interruptible-ultravox.py index f5205533a..bedabe1e3 100644 --- a/examples/foundational/07u-interruptible-ultravox.py +++ b/examples/foundational/07u-interruptible-ultravox.py @@ -91,11 +91,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07v-interruptible-neuphonic-http.py b/examples/foundational/07v-interruptible-neuphonic-http.py index 2fe0f6d78..39afa9987 100644 --- a/examples/foundational/07v-interruptible-neuphonic-http.py +++ b/examples/foundational/07v-interruptible-neuphonic-http.py @@ -103,11 +103,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07v-interruptible-neuphonic.py b/examples/foundational/07v-interruptible-neuphonic.py index 0aa23c419..5049020d8 100644 --- a/examples/foundational/07v-interruptible-neuphonic.py +++ b/examples/foundational/07v-interruptible-neuphonic.py @@ -102,11 +102,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07w-interruptible-fal.py b/examples/foundational/07w-interruptible-fal.py index 9176794fe..bd967aa10 100644 --- a/examples/foundational/07w-interruptible-fal.py +++ b/examples/foundational/07w-interruptible-fal.py @@ -105,11 +105,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07y-interruptible-minimax.py b/examples/foundational/07y-interruptible-minimax.py index 236a1e924..b8c9ded40 100644 --- a/examples/foundational/07y-interruptible-minimax.py +++ b/examples/foundational/07y-interruptible-minimax.py @@ -109,11 +109,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/07z-interruptible-sarvam.py b/examples/foundational/07z-interruptible-sarvam.py index 5774a706c..69a233991 100644 --- a/examples/foundational/07z-interruptible-sarvam.py +++ b/examples/foundational/07z-interruptible-sarvam.py @@ -108,11 +108,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/09-mirror.py b/examples/foundational/09-mirror.py index 43d15efed..406293351 100644 --- a/examples/foundational/09-mirror.py +++ b/examples/foundational/09-mirror.py @@ -90,11 +90,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/09a-local-mirror.py b/examples/foundational/09a-local-mirror.py index 66c870254..06855bbb7 100644 --- a/examples/foundational/09a-local-mirror.py +++ b/examples/foundational/09a-local-mirror.py @@ -113,11 +113,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await asyncio.gather(runner.run(task), run_tk()) diff --git a/examples/foundational/10-wake-phrase.py b/examples/foundational/10-wake-phrase.py index bfa8f5779..7851687cc 100644 --- a/examples/foundational/10-wake-phrase.py +++ b/examples/foundational/10-wake-phrase.py @@ -98,11 +98,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/11-sound-effects.py b/examples/foundational/11-sound-effects.py index 208e021a6..02ab18341 100644 --- a/examples/foundational/11-sound-effects.py +++ b/examples/foundational/11-sound-effects.py @@ -156,11 +156,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/12-describe-video.py b/examples/foundational/12-describe-video.py index 15ca5d74f..276508873 100644 --- a/examples/foundational/12-describe-video.py +++ b/examples/foundational/12-describe-video.py @@ -119,11 +119,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/12a-describe-video-gemini-flash.py b/examples/foundational/12a-describe-video-gemini-flash.py index b07981417..1e3d9d494 100644 --- a/examples/foundational/12a-describe-video-gemini-flash.py +++ b/examples/foundational/12a-describe-video-gemini-flash.py @@ -122,11 +122,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/12b-describe-video-gpt-4o.py b/examples/foundational/12b-describe-video-gpt-4o.py index 520c80204..d912ee91b 100644 --- a/examples/foundational/12b-describe-video-gpt-4o.py +++ b/examples/foundational/12b-describe-video-gpt-4o.py @@ -122,11 +122,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/12c-describe-video-anthropic.py b/examples/foundational/12c-describe-video-anthropic.py index face4a2d0..bf921df83 100644 --- a/examples/foundational/12c-describe-video-anthropic.py +++ b/examples/foundational/12c-describe-video-anthropic.py @@ -122,11 +122,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/13-whisper-transcription.py b/examples/foundational/13-whisper-transcription.py index 7487337ab..003d9ebb2 100644 --- a/examples/foundational/13-whisper-transcription.py +++ b/examples/foundational/13-whisper-transcription.py @@ -66,11 +66,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/13b-deepgram-transcription.py b/examples/foundational/13b-deepgram-transcription.py index 54cf2eadb..2318041cb 100644 --- a/examples/foundational/13b-deepgram-transcription.py +++ b/examples/foundational/13b-deepgram-transcription.py @@ -60,11 +60,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/13c-gladia-transcription.py b/examples/foundational/13c-gladia-transcription.py index b49037434..14237a5f0 100644 --- a/examples/foundational/13c-gladia-transcription.py +++ b/examples/foundational/13c-gladia-transcription.py @@ -60,11 +60,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/13c-gladia-translation.py b/examples/foundational/13c-gladia-translation.py index d0efcddfe..0deb03c71 100644 --- a/examples/foundational/13c-gladia-translation.py +++ b/examples/foundational/13c-gladia-translation.py @@ -81,11 +81,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/13d-assemblyai-transcription.py b/examples/foundational/13d-assemblyai-transcription.py index 1f02ec649..0a803d7d3 100644 --- a/examples/foundational/13d-assemblyai-transcription.py +++ b/examples/foundational/13d-assemblyai-transcription.py @@ -59,11 +59,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/13e-whisper-mlx.py b/examples/foundational/13e-whisper-mlx.py index b22e7b744..f8db6b924 100644 --- a/examples/foundational/13e-whisper-mlx.py +++ b/examples/foundational/13e-whisper-mlx.py @@ -93,11 +93,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14-function-calling.py b/examples/foundational/14-function-calling.py index be53841eb..64d2c4e4f 100644 --- a/examples/foundational/14-function-calling.py +++ b/examples/foundational/14-function-calling.py @@ -133,11 +133,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14a-function-calling-anthropic.py b/examples/foundational/14a-function-calling-anthropic.py index 977dac7da..7cfd5bce5 100644 --- a/examples/foundational/14a-function-calling-anthropic.py +++ b/examples/foundational/14a-function-calling-anthropic.py @@ -126,11 +126,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14b-function-calling-anthropic-video.py b/examples/foundational/14b-function-calling-anthropic-video.py index 8c00a48fb..660d8fb96 100644 --- a/examples/foundational/14b-function-calling-anthropic-video.py +++ b/examples/foundational/14b-function-calling-anthropic-video.py @@ -194,11 +194,6 @@ If you need to use a tool, simply use the tool. Do not tell the user the tool yo logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14c-function-calling-together.py b/examples/foundational/14c-function-calling-together.py index 788561e52..538af5737 100644 --- a/examples/foundational/14c-function-calling-together.py +++ b/examples/foundational/14c-function-calling-together.py @@ -126,11 +126,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14d-function-calling-video.py b/examples/foundational/14d-function-calling-video.py index 61e6590c2..034171808 100644 --- a/examples/foundational/14d-function-calling-video.py +++ b/examples/foundational/14d-function-calling-video.py @@ -177,11 +177,6 @@ indicate you should use the get_image tool are: logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14e-function-calling-gemini.py b/examples/foundational/14e-function-calling-gemini.py index d32ec7139..40d414f87 100644 --- a/examples/foundational/14e-function-calling-gemini.py +++ b/examples/foundational/14e-function-calling-gemini.py @@ -187,11 +187,6 @@ indicate you should use the get_image tool are: logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14f-function-calling-groq.py b/examples/foundational/14f-function-calling-groq.py index a84f1e0d6..c0099697b 100644 --- a/examples/foundational/14f-function-calling-groq.py +++ b/examples/foundational/14f-function-calling-groq.py @@ -135,11 +135,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14g-function-calling-grok.py b/examples/foundational/14g-function-calling-grok.py index 2fc8fddf5..d9643e0ad 100644 --- a/examples/foundational/14g-function-calling-grok.py +++ b/examples/foundational/14g-function-calling-grok.py @@ -128,11 +128,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14h-function-calling-azure.py b/examples/foundational/14h-function-calling-azure.py index 18bf7ccc8..3f79f30ef 100644 --- a/examples/foundational/14h-function-calling-azure.py +++ b/examples/foundational/14h-function-calling-azure.py @@ -134,11 +134,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14i-function-calling-fireworks.py b/examples/foundational/14i-function-calling-fireworks.py index ade59c524..13ed83b32 100644 --- a/examples/foundational/14i-function-calling-fireworks.py +++ b/examples/foundational/14i-function-calling-fireworks.py @@ -133,11 +133,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14j-function-calling-nim.py b/examples/foundational/14j-function-calling-nim.py index 6328dc1a6..e5e663ec8 100644 --- a/examples/foundational/14j-function-calling-nim.py +++ b/examples/foundational/14j-function-calling-nim.py @@ -131,11 +131,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14k-function-calling-cerebras.py b/examples/foundational/14k-function-calling-cerebras.py index dffad4090..b30bd9ca7 100644 --- a/examples/foundational/14k-function-calling-cerebras.py +++ b/examples/foundational/14k-function-calling-cerebras.py @@ -141,11 +141,6 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14l-function-calling-deepseek.py b/examples/foundational/14l-function-calling-deepseek.py index 37985a945..6d352835e 100644 --- a/examples/foundational/14l-function-calling-deepseek.py +++ b/examples/foundational/14l-function-calling-deepseek.py @@ -141,11 +141,6 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14m-function-calling-openrouter.py b/examples/foundational/14m-function-calling-openrouter.py index fd87c24f6..fd612aa92 100644 --- a/examples/foundational/14m-function-calling-openrouter.py +++ b/examples/foundational/14m-function-calling-openrouter.py @@ -135,11 +135,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14n-function-calling-perplexity.py b/examples/foundational/14n-function-calling-perplexity.py index 4321ba17f..8539dc2db 100644 --- a/examples/foundational/14n-function-calling-perplexity.py +++ b/examples/foundational/14n-function-calling-perplexity.py @@ -108,11 +108,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14o-function-calling-gemini-openai-format.py b/examples/foundational/14o-function-calling-gemini-openai-format.py index 92020b35a..08d82eee3 100644 --- a/examples/foundational/14o-function-calling-gemini-openai-format.py +++ b/examples/foundational/14o-function-calling-gemini-openai-format.py @@ -130,11 +130,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14p-function-calling-gemini-vertex-ai.py b/examples/foundational/14p-function-calling-gemini-vertex-ai.py index 22d4f39d6..86307e5a4 100644 --- a/examples/foundational/14p-function-calling-gemini-vertex-ai.py +++ b/examples/foundational/14p-function-calling-gemini-vertex-ai.py @@ -67,10 +67,10 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si ) llm = GoogleVertexLLMService( - # credentials="", + credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"), params=GoogleVertexLLMService.InputParams( project_id="", - ) + ), ) # You can aslo register a function_name of None to get all functions # sent to the same callback with an additional function_name parameter. @@ -136,11 +136,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14q-function-calling-qwen.py b/examples/foundational/14q-function-calling-qwen.py index 96412272e..520e675e0 100644 --- a/examples/foundational/14q-function-calling-qwen.py +++ b/examples/foundational/14q-function-calling-qwen.py @@ -133,11 +133,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/14r-function-calling-aws.py b/examples/foundational/14r-function-calling-aws.py index f3ae920fa..923fb3423 100644 --- a/examples/foundational/14r-function-calling-aws.py +++ b/examples/foundational/14r-function-calling-aws.py @@ -137,11 +137,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/15-switch-voices.py b/examples/foundational/15-switch-voices.py index 3bbcb5d08..44372b120 100644 --- a/examples/foundational/15-switch-voices.py +++ b/examples/foundational/15-switch-voices.py @@ -166,11 +166,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/15a-switch-languages.py b/examples/foundational/15a-switch-languages.py index cca2aaa92..fb7a401e8 100644 --- a/examples/foundational/15a-switch-languages.py +++ b/examples/foundational/15a-switch-languages.py @@ -154,11 +154,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/16-gpu-container-local-bot.py b/examples/foundational/16-gpu-container-local-bot.py index cd8739e28..2b6f18576 100644 --- a/examples/foundational/16-gpu-container-local-bot.py +++ b/examples/foundational/16-gpu-container-local-bot.py @@ -137,11 +137,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/17-detect-user-idle.py b/examples/foundational/17-detect-user-idle.py index 224d43446..66bc2be52 100644 --- a/examples/foundational/17-detect-user-idle.py +++ b/examples/foundational/17-detect-user-idle.py @@ -135,11 +135,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/19-openai-realtime-beta.py b/examples/foundational/19-openai-realtime-beta.py index b4dbd710e..307eb11d3 100644 --- a/examples/foundational/19-openai-realtime-beta.py +++ b/examples/foundational/19-openai-realtime-beta.py @@ -177,11 +177,6 @@ Remember, your responses should be short. Just one or two sentences, usually.""" logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/19a-azure-realtime-beta.py b/examples/foundational/19a-azure-realtime-beta.py index 032141f4e..12cb259ba 100644 --- a/examples/foundational/19a-azure-realtime-beta.py +++ b/examples/foundational/19a-azure-realtime-beta.py @@ -176,11 +176,6 @@ Remember, your responses should be short. Just one or two sentences, usually.""" logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/20a-persistent-context-openai.py b/examples/foundational/20a-persistent-context-openai.py index 94a858d8d..285d902f7 100644 --- a/examples/foundational/20a-persistent-context-openai.py +++ b/examples/foundational/20a-persistent-context-openai.py @@ -241,11 +241,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/20b-persistent-context-openai-realtime.py b/examples/foundational/20b-persistent-context-openai-realtime.py index 589438a00..799108066 100644 --- a/examples/foundational/20b-persistent-context-openai-realtime.py +++ b/examples/foundational/20b-persistent-context-openai-realtime.py @@ -251,11 +251,6 @@ Remember, your responses should be short. Just one or two sentences, usually.""" logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/20c-persistent-context-anthropic.py b/examples/foundational/20c-persistent-context-anthropic.py index 078f5837f..ef5ec0ee9 100644 --- a/examples/foundational/20c-persistent-context-anthropic.py +++ b/examples/foundational/20c-persistent-context-anthropic.py @@ -240,11 +240,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/20d-persistent-context-gemini.py b/examples/foundational/20d-persistent-context-gemini.py index a88028c63..131f32420 100644 --- a/examples/foundational/20d-persistent-context-gemini.py +++ b/examples/foundational/20d-persistent-context-gemini.py @@ -299,11 +299,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/20e-persistent-context-aws-nova-sonic.py b/examples/foundational/20e-persistent-context-aws-nova-sonic.py index 1d1910e9a..5c848d6f5 100644 --- a/examples/foundational/20e-persistent-context-aws-nova-sonic.py +++ b/examples/foundational/20e-persistent-context-aws-nova-sonic.py @@ -264,11 +264,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/21a-tavus-video-service.py b/examples/foundational/21a-tavus-video-service.py index 8729f30a4..59109f119 100644 --- a/examples/foundational/21a-tavus-video-service.py +++ b/examples/foundational/21a-tavus-video-service.py @@ -120,11 +120,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/22-natural-conversation.py b/examples/foundational/22-natural-conversation.py index 00840fd98..6fe26e053 100644 --- a/examples/foundational/22-natural-conversation.py +++ b/examples/foundational/22-natural-conversation.py @@ -166,11 +166,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/22b-natural-conversation-proposal.py b/examples/foundational/22b-natural-conversation-proposal.py index 48c0ce11b..1c3c9ee6e 100644 --- a/examples/foundational/22b-natural-conversation-proposal.py +++ b/examples/foundational/22b-natural-conversation-proposal.py @@ -391,11 +391,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/22c-natural-conversation-mixed-llms.py b/examples/foundational/22c-natural-conversation-mixed-llms.py index 9a2f14332..391b39329 100644 --- a/examples/foundational/22c-natural-conversation-mixed-llms.py +++ b/examples/foundational/22c-natural-conversation-mixed-llms.py @@ -598,11 +598,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/22d-natural-conversation-gemini-audio.py b/examples/foundational/22d-natural-conversation-gemini-audio.py index 876396214..f87a776e6 100644 --- a/examples/foundational/22d-natural-conversation-gemini-audio.py +++ b/examples/foundational/22d-natural-conversation-gemini-audio.py @@ -777,11 +777,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/23-bot-background-sound.py b/examples/foundational/23-bot-background-sound.py index 081bd79ed..e72ea0614 100644 --- a/examples/foundational/23-bot-background-sound.py +++ b/examples/foundational/23-bot-background-sound.py @@ -132,11 +132,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/24-stt-mute-filter.py b/examples/foundational/24-stt-mute-filter.py index 13208f3ac..981e91957 100644 --- a/examples/foundational/24-stt-mute-filter.py +++ b/examples/foundational/24-stt-mute-filter.py @@ -140,11 +140,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/25-google-audio-in.py b/examples/foundational/25-google-audio-in.py index 1e6ad07bc..f97e91832 100644 --- a/examples/foundational/25-google-audio-in.py +++ b/examples/foundational/25-google-audio-in.py @@ -374,11 +374,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/26-gemini-multimodal-live.py b/examples/foundational/26-gemini-multimodal-live.py index a7dd69d11..13036fb43 100644 --- a/examples/foundational/26-gemini-multimodal-live.py +++ b/examples/foundational/26-gemini-multimodal-live.py @@ -113,11 +113,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - # Run the pipeline runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/26a-gemini-multimodal-live-transcription.py b/examples/foundational/26a-gemini-multimodal-live-transcription.py index d7aa1ef72..6765dbab5 100644 --- a/examples/foundational/26a-gemini-multimodal-live-transcription.py +++ b/examples/foundational/26a-gemini-multimodal-live-transcription.py @@ -124,11 +124,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - # Register event handler for transcript updates @transcript.event_handler("on_transcript_update") async def on_transcript_update(processor, frame): diff --git a/examples/foundational/26b-gemini-multimodal-live-function-calling.py b/examples/foundational/26b-gemini-multimodal-live-function-calling.py index d141e3996..7087f5766 100644 --- a/examples/foundational/26b-gemini-multimodal-live-function-calling.py +++ b/examples/foundational/26b-gemini-multimodal-live-function-calling.py @@ -149,11 +149,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/26c-gemini-multimodal-live-video.py b/examples/foundational/26c-gemini-multimodal-live-video.py index 824d58b9c..511ae3346 100644 --- a/examples/foundational/26c-gemini-multimodal-live-video.py +++ b/examples/foundational/26c-gemini-multimodal-live-video.py @@ -10,7 +10,7 @@ import os from dotenv import load_dotenv from loguru import logger -from run import get_transport_client_id, maybe_capture_participant_video +from run import maybe_capture_participant_video from pipecat.audio.vad.silero import SileroVADAnalyzer from pipecat.audio.vad.vad_analyzer import VADParams @@ -105,11 +105,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/26d-gemini-multimodal-live-text.py b/examples/foundational/26d-gemini-multimodal-live-text.py index 8c83606e3..da388deda 100644 --- a/examples/foundational/26d-gemini-multimodal-live-text.py +++ b/examples/foundational/26d-gemini-multimodal-live-text.py @@ -136,11 +136,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/26e-gemini-multimodal-google-search.py b/examples/foundational/26e-gemini-multimodal-google-search.py index eb731cd68..5fc1d8d1e 100644 --- a/examples/foundational/26e-gemini-multimodal-google-search.py +++ b/examples/foundational/26e-gemini-multimodal-google-search.py @@ -120,11 +120,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/27-simli-layer.py b/examples/foundational/27-simli-layer.py index 14fa9c49f..1b3faba39 100644 --- a/examples/foundational/27-simli-layer.py +++ b/examples/foundational/27-simli-layer.py @@ -108,11 +108,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/28-transcription-processor.py b/examples/foundational/28-transcription-processor.py index 2d2e68d91..2cb0f3122 100644 --- a/examples/foundational/28-transcription-processor.py +++ b/examples/foundational/28-transcription-processor.py @@ -170,11 +170,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/29-turn-tracking-observer.py b/examples/foundational/29-turn-tracking-observer.py index cb9b2f651..267b95f2f 100644 --- a/examples/foundational/29-turn-tracking-observer.py +++ b/examples/foundational/29-turn-tracking-observer.py @@ -118,11 +118,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/30-observer.py b/examples/foundational/30-observer.py index dcc215ced..ad0a8cace 100644 --- a/examples/foundational/30-observer.py +++ b/examples/foundational/30-observer.py @@ -163,11 +163,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/32-gemini-grounding-metadata.py b/examples/foundational/32-gemini-grounding-metadata.py index 769e9aa11..3dba663d9 100644 --- a/examples/foundational/32-gemini-grounding-metadata.py +++ b/examples/foundational/32-gemini-grounding-metadata.py @@ -145,11 +145,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/33-gemini-rag.py b/examples/foundational/33-gemini-rag.py index e49c949b6..9653e5f2f 100644 --- a/examples/foundational/33-gemini-rag.py +++ b/examples/foundational/33-gemini-rag.py @@ -256,11 +256,6 @@ Your response will be turned into speech so use only simple words and punctuatio logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/34-audio-recording.py b/examples/foundational/34-audio-recording.py index c9effa933..7922c0b7e 100644 --- a/examples/foundational/34-audio-recording.py +++ b/examples/foundational/34-audio-recording.py @@ -161,11 +161,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - # Handler for merged audio @audiobuffer.event_handler("on_audio_data") async def on_audio_data(buffer, audio, sample_rate, num_channels): diff --git a/examples/foundational/35-pattern-pair-voice-switching.py b/examples/foundational/35-pattern-pair-voice-switching.py index e653454ea..b753967a9 100644 --- a/examples/foundational/35-pattern-pair-voice-switching.py +++ b/examples/foundational/35-pattern-pair-voice-switching.py @@ -229,11 +229,6 @@ Remember: Use narrator voice for EVERYTHING except the actual quoted dialogue."" logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/36-user-email-gathering.py b/examples/foundational/36-user-email-gathering.py index 5cea0cdbf..58be17224 100644 --- a/examples/foundational/36-user-email-gathering.py +++ b/examples/foundational/36-user-email-gathering.py @@ -147,11 +147,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/37-mem0.py b/examples/foundational/37-mem0.py index 3ee7a2507..35d410297 100644 --- a/examples/foundational/37-mem0.py +++ b/examples/foundational/37-mem0.py @@ -287,11 +287,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/38-smart-turn-fal.py b/examples/foundational/38-smart-turn-fal.py index 84ae564d5..12d971232 100644 --- a/examples/foundational/38-smart-turn-fal.py +++ b/examples/foundational/38-smart-turn-fal.py @@ -116,11 +116,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/38a-smart-turn-local-coreml.py b/examples/foundational/38a-smart-turn-local-coreml.py index 0b2d4557f..87e193674 100644 --- a/examples/foundational/38a-smart-turn-local-coreml.py +++ b/examples/foundational/38a-smart-turn-local-coreml.py @@ -131,11 +131,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/38b-smart-turn-local.py b/examples/foundational/38b-smart-turn-local.py index 967f58cdc..850f5d640 100644 --- a/examples/foundational/38b-smart-turn-local.py +++ b/examples/foundational/38b-smart-turn-local.py @@ -131,11 +131,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/39-mcp-stdio.py b/examples/foundational/39-mcp-stdio.py index 576a93b19..f71a4f0b4 100644 --- a/examples/foundational/39-mcp-stdio.py +++ b/examples/foundational/39-mcp-stdio.py @@ -186,11 +186,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/39a-mcp-run-sse.py b/examples/foundational/39a-mcp-run-sse.py index ec0fb3071..cae94a037 100644 --- a/examples/foundational/39a-mcp-run-sse.py +++ b/examples/foundational/39a-mcp-run-sse.py @@ -117,11 +117,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/39b-multiple-mcp.py b/examples/foundational/39b-multiple-mcp.py index 65384f94b..fc2e53122 100644 --- a/examples/foundational/39b-multiple-mcp.py +++ b/examples/foundational/39b-multiple-mcp.py @@ -196,11 +196,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/foundational/40-aws-nova-sonic.py b/examples/foundational/40-aws-nova-sonic.py index ba59bfffc..7f57a24d8 100644 --- a/examples/foundational/40-aws-nova-sonic.py +++ b/examples/foundational/40-aws-nova-sonic.py @@ -167,11 +167,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - # Run the pipeline runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/open-telemetry/jaeger/bot.py b/examples/open-telemetry/jaeger/bot.py index a0e8a203c..0fb8bfd2e 100644 --- a/examples/open-telemetry/jaeger/bot.py +++ b/examples/open-telemetry/jaeger/bot.py @@ -154,10 +154,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info(f"Client disconnected") - - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") await task.cancel() runner = PipelineRunner(handle_sigint=handle_sigint) diff --git a/examples/open-telemetry/langfuse/bot.py b/examples/open-telemetry/langfuse/bot.py index 0fafc8c36..eb1ed0748 100644 --- a/examples/open-telemetry/langfuse/bot.py +++ b/examples/open-telemetry/langfuse/bot.py @@ -153,11 +153,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si logger.info(f"Client disconnected") await task.cancel() - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") - await task.cancel() - runner = PipelineRunner(handle_sigint=handle_sigint) await runner.run(task) diff --git a/examples/p2p-webrtc/daily-interop-bridge/bot.py b/examples/p2p-webrtc/daily-interop-bridge/bot.py index 0e859b5a0..659d3fcef 100644 --- a/examples/p2p-webrtc/daily-interop-bridge/bot.py +++ b/examples/p2p-webrtc/daily-interop-bridge/bot.py @@ -112,10 +112,6 @@ async def run_bot(webrtc_connection): @pipecat_transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info("Pipecat Client disconnected") - - @pipecat_transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info("Pipecat Client closed") await task.cancel() runner = PipelineRunner(handle_sigint=False) diff --git a/examples/p2p-webrtc/video-transform/server/bot.py b/examples/p2p-webrtc/video-transform/server/bot.py index a6d885cea..44684d4ea 100644 --- a/examples/p2p-webrtc/video-transform/server/bot.py +++ b/examples/p2p-webrtc/video-transform/server/bot.py @@ -140,10 +140,6 @@ async def run_bot(webrtc_connection): @pipecat_transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info("Pipecat Client disconnected") - - @pipecat_transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info("Pipecat Client closed") await task.cancel() runner = PipelineRunner(handle_sigint=False) diff --git a/examples/p2p-webrtc/voice-agent/bot.py b/examples/p2p-webrtc/voice-agent/bot.py index 4cda32a59..505a768e6 100644 --- a/examples/p2p-webrtc/voice-agent/bot.py +++ b/examples/p2p-webrtc/voice-agent/bot.py @@ -86,10 +86,6 @@ async def run_bot(webrtc_connection): @pipecat_transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info("Pipecat Client disconnected") - - @pipecat_transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info("Pipecat Client closed") await task.cancel() runner = PipelineRunner(handle_sigint=False)