diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a1f99d3a..afba77a64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- ⚠️ `PipelineTask` now requires keyword arguments (except for the first one for + the pipeline). + - The base `TTSService` class now strips leading newlines before sending text to the TTS provider. This change is to solve issues where some TTS providers, like Azure, would not output text due to newlines. diff --git a/examples/bot-ready-signalling/server/signalling_bot.py b/examples/bot-ready-signalling/server/signalling_bot.py index 4d4d287b5..c6e47b812 100644 --- a/examples/bot-ready-signalling/server/signalling_bot.py +++ b/examples/bot-ready-signalling/server/signalling_bot.py @@ -17,7 +17,7 @@ from runner import configure from pipecat.frames.frames import AudioRawFrame, EndFrame, OutputAudioRawFrame, TTSSpeakFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineParams, PipelineTask +from pipecat.pipeline.task import PipelineTask from pipecat.services.cartesia import CartesiaTTSService from pipecat.transports.services.daily import DailyParams, DailyTransport diff --git a/examples/canonical-metrics/bot.py b/examples/canonical-metrics/bot.py index 7e6b62a44..aa376c290 100644 --- a/examples/canonical-metrics/bot.py +++ b/examples/canonical-metrics/bot.py @@ -119,7 +119,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/chatbot-audio-recording/bot.py b/examples/chatbot-audio-recording/bot.py index 47f0917dc..d37d0414e 100644 --- a/examples/chatbot-audio-recording/bot.py +++ b/examples/chatbot-audio-recording/bot.py @@ -124,7 +124,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @audiobuffer.event_handler("on_audio_data") async def on_audio_data(buffer, audio, sample_rate, num_channels): diff --git a/examples/deployment/flyio-example/bot.py b/examples/deployment/flyio-example/bot.py index b74e01231..e01ec7e5c 100644 --- a/examples/deployment/flyio-example/bot.py +++ b/examples/deployment/flyio-example/bot.py @@ -70,7 +70,7 @@ async def main(room_url: str, token: str): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/deployment/modal-example/bot.py b/examples/deployment/modal-example/bot.py index 7855caeb8..02bcff379 100644 --- a/examples/deployment/modal-example/bot.py +++ b/examples/deployment/modal-example/bot.py @@ -62,7 +62,7 @@ async def main(room_url: str, token: str): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/03b-still-frame-imagen.py b/examples/foundational/03b-still-frame-imagen.py index 87e73950e..cb9efb01f 100644 --- a/examples/foundational/03b-still-frame-imagen.py +++ b/examples/foundational/03b-still-frame-imagen.py @@ -44,7 +44,8 @@ async def main(): runner = PipelineRunner() task = PipelineTask( - Pipeline([imagegen, transport.output()]), PipelineParams(enable_metrics=True) + Pipeline([imagegen, transport.output()]), + params=PipelineParams(enable_metrics=True), ) @transport.event_handler("on_first_participant_joined") diff --git a/examples/foundational/06-listen-and-respond.py b/examples/foundational/06-listen-and-respond.py index 8c349d567..ee9ae056a 100644 --- a/examples/foundational/06-listen-and-respond.py +++ b/examples/foundational/06-listen-and-respond.py @@ -105,7 +105,10 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams(enable_metrics=True, enable_usage_metrics=True), + params=PipelineParams( + enable_metrics=True, + enable_usage_metrics=True, + ), ) @transport.event_handler("on_first_participant_joined") diff --git a/examples/foundational/06a-image-sync.py b/examples/foundational/06a-image-sync.py index 03a7fd3b8..077f9b7dd 100644 --- a/examples/foundational/06a-image-sync.py +++ b/examples/foundational/06a-image-sync.py @@ -127,7 +127,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07-interruptible-vad.py b/examples/foundational/07-interruptible-vad.py index 1aee662c3..d6d3aca7c 100644 --- a/examples/foundational/07-interruptible-vad.py +++ b/examples/foundational/07-interruptible-vad.py @@ -76,7 +76,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07-interruptible.py b/examples/foundational/07-interruptible.py index bb3965159..13e728bfc 100644 --- a/examples/foundational/07-interruptible.py +++ b/examples/foundational/07-interruptible.py @@ -74,7 +74,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07a-interruptible-anthropic.py b/examples/foundational/07a-interruptible-anthropic.py index 62e1186b6..f855f81e6 100644 --- a/examples/foundational/07a-interruptible-anthropic.py +++ b/examples/foundational/07a-interruptible-anthropic.py @@ -79,7 +79,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07b-interruptible-langchain.py b/examples/foundational/07b-interruptible-langchain.py index 9c093f233..efa631b34 100644 --- a/examples/foundational/07b-interruptible-langchain.py +++ b/examples/foundational/07b-interruptible-langchain.py @@ -103,7 +103,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07c-interruptible-deepgram-vad.py b/examples/foundational/07c-interruptible-deepgram-vad.py index 831accfd9..55f421bfa 100644 --- a/examples/foundational/07c-interruptible-deepgram-vad.py +++ b/examples/foundational/07c-interruptible-deepgram-vad.py @@ -81,7 +81,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07c-interruptible-deepgram.py b/examples/foundational/07c-interruptible-deepgram.py index fc805ed56..1e7059657 100644 --- a/examples/foundational/07c-interruptible-deepgram.py +++ b/examples/foundational/07c-interruptible-deepgram.py @@ -74,7 +74,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07d-interruptible-elevenlabs.py b/examples/foundational/07d-interruptible-elevenlabs.py index dd2e4735f..ec91ae7cd 100644 --- a/examples/foundational/07d-interruptible-elevenlabs.py +++ b/examples/foundational/07d-interruptible-elevenlabs.py @@ -74,7 +74,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07e-interruptible-playht-http.py b/examples/foundational/07e-interruptible-playht-http.py index 17c49d1be..45795a6ef 100644 --- a/examples/foundational/07e-interruptible-playht-http.py +++ b/examples/foundational/07e-interruptible-playht-http.py @@ -75,7 +75,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07e-interruptible-playht.py b/examples/foundational/07e-interruptible-playht.py index fa4c5d6d4..5ccb96c15 100644 --- a/examples/foundational/07e-interruptible-playht.py +++ b/examples/foundational/07e-interruptible-playht.py @@ -77,7 +77,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07f-interruptible-azure.py b/examples/foundational/07f-interruptible-azure.py index 9f66a2811..d30ddc975 100644 --- a/examples/foundational/07f-interruptible-azure.py +++ b/examples/foundational/07f-interruptible-azure.py @@ -83,7 +83,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07g-interruptible-openai.py b/examples/foundational/07g-interruptible-openai.py index 01d869e91..f9cac5910 100644 --- a/examples/foundational/07g-interruptible-openai.py +++ b/examples/foundational/07g-interruptible-openai.py @@ -81,7 +81,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07h-interruptible-openpipe.py b/examples/foundational/07h-interruptible-openpipe.py index 0084f9b64..95d786297 100644 --- a/examples/foundational/07h-interruptible-openpipe.py +++ b/examples/foundational/07h-interruptible-openpipe.py @@ -81,7 +81,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07i-interruptible-xtts.py b/examples/foundational/07i-interruptible-xtts.py index 18980afe9..389f9ee60 100644 --- a/examples/foundational/07i-interruptible-xtts.py +++ b/examples/foundational/07i-interruptible-xtts.py @@ -75,7 +75,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07j-interruptible-gladia.py b/examples/foundational/07j-interruptible-gladia.py index b4405ebf7..b1e92e787 100644 --- a/examples/foundational/07j-interruptible-gladia.py +++ b/examples/foundational/07j-interruptible-gladia.py @@ -80,7 +80,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07k-interruptible-lmnt.py b/examples/foundational/07k-interruptible-lmnt.py index a6fd3aff4..8ce5a7f16 100644 --- a/examples/foundational/07k-interruptible-lmnt.py +++ b/examples/foundational/07k-interruptible-lmnt.py @@ -71,7 +71,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07l-interruptible-together.py b/examples/foundational/07l-interruptible-together.py index 14bcb703c..54ebd4c2c 100644 --- a/examples/foundational/07l-interruptible-together.py +++ b/examples/foundational/07l-interruptible-together.py @@ -88,7 +88,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07m-interruptible-polly.py b/examples/foundational/07m-interruptible-polly.py index 15035a35f..3d49dc291 100644 --- a/examples/foundational/07m-interruptible-polly.py +++ b/examples/foundational/07m-interruptible-polly.py @@ -81,7 +81,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07n-interruptible-google.py b/examples/foundational/07n-interruptible-google.py index f1cf9712e..6026afc45 100644 --- a/examples/foundational/07n-interruptible-google.py +++ b/examples/foundational/07n-interruptible-google.py @@ -79,7 +79,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07o-interruptible-assemblyai.py b/examples/foundational/07o-interruptible-assemblyai.py index 6e3ac5d5c..bffa35322 100644 --- a/examples/foundational/07o-interruptible-assemblyai.py +++ b/examples/foundational/07o-interruptible-assemblyai.py @@ -80,7 +80,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07p-interruptible-krisp.py b/examples/foundational/07p-interruptible-krisp.py index 0773acad6..b7b3bb822 100644 --- a/examples/foundational/07p-interruptible-krisp.py +++ b/examples/foundational/07p-interruptible-krisp.py @@ -76,7 +76,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07q-interruptible-rime.py b/examples/foundational/07q-interruptible-rime.py index 7bbc4cb25..e0b932a72 100644 --- a/examples/foundational/07q-interruptible-rime.py +++ b/examples/foundational/07q-interruptible-rime.py @@ -74,7 +74,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07r-interruptible-riva-nim.py b/examples/foundational/07r-interruptible-riva-nim.py index d54ae4c19..f62717355 100644 --- a/examples/foundational/07r-interruptible-riva-nim.py +++ b/examples/foundational/07r-interruptible-riva-nim.py @@ -74,7 +74,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/07s-interruptible-google-audio-in.py b/examples/foundational/07s-interruptible-google-audio-in.py index d4c9bc9d7..e1232a155 100644 --- a/examples/foundational/07s-interruptible-google-audio-in.py +++ b/examples/foundational/07s-interruptible-google-audio-in.py @@ -251,7 +251,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/07t-interruptible-fish.py b/examples/foundational/07t-interruptible-fish.py index f7521ac68..ea1456a22 100644 --- a/examples/foundational/07t-interruptible-fish.py +++ b/examples/foundational/07t-interruptible-fish.py @@ -74,7 +74,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/09-mirror.py b/examples/foundational/09-mirror.py index 669562742..dc060ccc4 100644 --- a/examples/foundational/09-mirror.py +++ b/examples/foundational/09-mirror.py @@ -78,7 +78,11 @@ async def main(): runner = PipelineRunner() task = PipelineTask( - pipeline, PipelineParams(audio_in_sample_rate=24000, audio_out_sample_rate=24000) + pipeline, + params=PipelineParams( + audio_in_sample_rate=24000, + audio_out_sample_rate=24000, + ), ) await runner.run(task) diff --git a/examples/foundational/09a-local-mirror.py b/examples/foundational/09a-local-mirror.py index d9a010766..eb6739f49 100644 --- a/examples/foundational/09a-local-mirror.py +++ b/examples/foundational/09a-local-mirror.py @@ -82,7 +82,11 @@ async def main(): pipeline = Pipeline([daily_transport.input(), MirrorProcessor(), tk_transport.output()]) task = PipelineTask( - pipeline, PipelineParams(audio_in_sample_rate=24000, audio_out_sample_rate=24000) + pipeline, + params=PipelineParams( + audio_in_sample_rate=24000, + audio_out_sample_rate=24000, + ), ) async def run_tk(): diff --git a/examples/foundational/10-wake-phrase.py b/examples/foundational/10-wake-phrase.py index 0c7cee0a2..1bdeba15f 100644 --- a/examples/foundational/10-wake-phrase.py +++ b/examples/foundational/10-wake-phrase.py @@ -76,7 +76,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/14-function-calling.py b/examples/foundational/14-function-calling.py index 5ce8693cc..7c77378fc 100644 --- a/examples/foundational/14-function-calling.py +++ b/examples/foundational/14-function-calling.py @@ -112,7 +112,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14a-function-calling-anthropic.py b/examples/foundational/14a-function-calling-anthropic.py index a387c038a..4723de004 100644 --- a/examples/foundational/14a-function-calling-anthropic.py +++ b/examples/foundational/14a-function-calling-anthropic.py @@ -99,7 +99,13 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True, enable_metrics=True)) + task = PipelineTask( + pipeline, + params=PipelineParams( + allow_interruptions=True, + enable_metrics=True, + ), + ) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/14b-function-calling-anthropic-video.py b/examples/foundational/14b-function-calling-anthropic-video.py index a499ddacd..69f1e5776 100644 --- a/examples/foundational/14b-function-calling-anthropic-video.py +++ b/examples/foundational/14b-function-calling-anthropic-video.py @@ -153,7 +153,13 @@ If you need to use a tool, simply use the tool. Do not tell the user the tool yo ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True, enable_metrics=True)) + task = PipelineTask( + pipeline, + params=PipelineParams( + allow_interruptions=True, + enable_metrics=True, + ), + ) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/14e-function-calling-gemini.py b/examples/foundational/14e-function-calling-gemini.py index ad5d82b6a..477d6c5ca 100644 --- a/examples/foundational/14e-function-calling-gemini.py +++ b/examples/foundational/14e-function-calling-gemini.py @@ -152,7 +152,7 @@ indicate you should use the get_image tool are: task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14f-function-calling-groq.py b/examples/foundational/14f-function-calling-groq.py index 3e285dba3..f2768a788 100644 --- a/examples/foundational/14f-function-calling-groq.py +++ b/examples/foundational/14f-function-calling-groq.py @@ -116,7 +116,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14g-function-calling-grok.py b/examples/foundational/14g-function-calling-grok.py index 49b3d6831..7318f455d 100644 --- a/examples/foundational/14g-function-calling-grok.py +++ b/examples/foundational/14g-function-calling-grok.py @@ -113,7 +113,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14h-function-calling-azure.py b/examples/foundational/14h-function-calling-azure.py index cd426366c..cfd56b59d 100644 --- a/examples/foundational/14h-function-calling-azure.py +++ b/examples/foundational/14h-function-calling-azure.py @@ -117,7 +117,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14i-function-calling-fireworks.py b/examples/foundational/14i-function-calling-fireworks.py index 331e1c850..53346686f 100644 --- a/examples/foundational/14i-function-calling-fireworks.py +++ b/examples/foundational/14i-function-calling-fireworks.py @@ -116,7 +116,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14j-function-calling-nim.py b/examples/foundational/14j-function-calling-nim.py index 6a2d7d061..712ce0742 100644 --- a/examples/foundational/14j-function-calling-nim.py +++ b/examples/foundational/14j-function-calling-nim.py @@ -116,7 +116,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14k-function-calling-cerebras.py b/examples/foundational/14k-function-calling-cerebras.py index 05f7d2a94..4a65adbef 100644 --- a/examples/foundational/14k-function-calling-cerebras.py +++ b/examples/foundational/14k-function-calling-cerebras.py @@ -123,7 +123,7 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14l-function-calling-deepseek.py b/examples/foundational/14l-function-calling-deepseek.py index 8170c7d0f..f67d583ee 100644 --- a/examples/foundational/14l-function-calling-deepseek.py +++ b/examples/foundational/14l-function-calling-deepseek.py @@ -123,7 +123,7 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14m-function-calling-openrouter.py b/examples/foundational/14m-function-calling-openrouter.py index 3325ab240..622337b07 100644 --- a/examples/foundational/14m-function-calling-openrouter.py +++ b/examples/foundational/14m-function-calling-openrouter.py @@ -117,7 +117,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/14n-function-calling-perplexity.py b/examples/foundational/14n-function-calling-perplexity.py index ba4d252d4..aee185f75 100644 --- a/examples/foundational/14n-function-calling-perplexity.py +++ b/examples/foundational/14n-function-calling-perplexity.py @@ -83,7 +83,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/15-switch-voices.py b/examples/foundational/15-switch-voices.py index be5b7e3e6..49280449f 100644 --- a/examples/foundational/15-switch-voices.py +++ b/examples/foundational/15-switch-voices.py @@ -133,7 +133,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/15a-switch-languages.py b/examples/foundational/15a-switch-languages.py index f3b97f704..217502ea2 100644 --- a/examples/foundational/15a-switch-languages.py +++ b/examples/foundational/15a-switch-languages.py @@ -126,7 +126,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/16-gpu-container-local-bot.py b/examples/foundational/16-gpu-container-local-bot.py index d025cc7bb..d6984925e 100644 --- a/examples/foundational/16-gpu-container-local-bot.py +++ b/examples/foundational/16-gpu-container-local-bot.py @@ -85,7 +85,13 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True, enable_metrics=True)) + task = PipelineTask( + pipeline, + params=PipelineParams( + allow_interruptions=True, + enable_metrics=True, + ), + ) # When a participant joins, start transcription for that participant so the # bot can "hear" and respond to them. diff --git a/examples/foundational/17-detect-user-idle.py b/examples/foundational/17-detect-user-idle.py index e0af16c92..00c969df4 100644 --- a/examples/foundational/17-detect-user-idle.py +++ b/examples/foundational/17-detect-user-idle.py @@ -108,7 +108,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, report_only_initial_ttfb=True, diff --git a/examples/foundational/19-openai-realtime-beta.py b/examples/foundational/19-openai-realtime-beta.py index 609b5f036..504f8fbf1 100644 --- a/examples/foundational/19-openai-realtime-beta.py +++ b/examples/foundational/19-openai-realtime-beta.py @@ -154,7 +154,7 @@ Remember, your responses should be short. Just one or two sentences, usually.""" task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/20a-persistent-context-openai.py b/examples/foundational/20a-persistent-context-openai.py index 28008d3b8..8da683a47 100644 --- a/examples/foundational/20a-persistent-context-openai.py +++ b/examples/foundational/20a-persistent-context-openai.py @@ -212,7 +212,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/20b-persistent-context-openai-realtime.py b/examples/foundational/20b-persistent-context-openai-realtime.py index 3a1c43f47..ef82bd567 100644 --- a/examples/foundational/20b-persistent-context-openai-realtime.py +++ b/examples/foundational/20b-persistent-context-openai-realtime.py @@ -237,7 +237,7 @@ Remember, your responses should be short. Just one or two sentences, usually.""" task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/20c-persistent-context-anthropic.py b/examples/foundational/20c-persistent-context-anthropic.py index 2e7c61b68..64829450d 100644 --- a/examples/foundational/20c-persistent-context-anthropic.py +++ b/examples/foundational/20c-persistent-context-anthropic.py @@ -209,7 +209,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/20d-persistent-context-gemini.py b/examples/foundational/20d-persistent-context-gemini.py index 1fb9d7b21..74c4e69be 100644 --- a/examples/foundational/20d-persistent-context-gemini.py +++ b/examples/foundational/20d-persistent-context-gemini.py @@ -263,7 +263,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/21-tavus-layer.py b/examples/foundational/21-tavus-layer.py index 0cbc065a0..c78c7eb41 100644 --- a/examples/foundational/21-tavus-layer.py +++ b/examples/foundational/21-tavus-layer.py @@ -87,7 +87,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( # We just use 16000 because that's what Tavus is expecting and # we avoid resampling. audio_in_sample_rate=16000, diff --git a/examples/foundational/22-natural-conversation.py b/examples/foundational/22-natural-conversation.py index 5e6b0e501..9282f4e4b 100644 --- a/examples/foundational/22-natural-conversation.py +++ b/examples/foundational/22-natural-conversation.py @@ -145,7 +145,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/22b-natural-conversation-proposal.py b/examples/foundational/22b-natural-conversation-proposal.py index f828c2878..1eb2dd956 100644 --- a/examples/foundational/22b-natural-conversation-proposal.py +++ b/examples/foundational/22b-natural-conversation-proposal.py @@ -355,7 +355,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/22c-natural-conversation-mixed-llms.py b/examples/foundational/22c-natural-conversation-mixed-llms.py index 283a7e518..362c7554d 100644 --- a/examples/foundational/22c-natural-conversation-mixed-llms.py +++ b/examples/foundational/22c-natural-conversation-mixed-llms.py @@ -564,7 +564,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/22d-natural-conversation-gemini-audio.py b/examples/foundational/22d-natural-conversation-gemini-audio.py index dde280fc1..9be9ec458 100644 --- a/examples/foundational/22d-natural-conversation-gemini-audio.py +++ b/examples/foundational/22d-natural-conversation-gemini-audio.py @@ -742,7 +742,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/23-bot-background-sound.py b/examples/foundational/23-bot-background-sound.py index c0347ebe3..1b443190d 100644 --- a/examples/foundational/23-bot-background-sound.py +++ b/examples/foundational/23-bot-background-sound.py @@ -87,7 +87,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/24-stt-mute-filter.py b/examples/foundational/24-stt-mute-filter.py index fe17a1085..7ae6c73fa 100644 --- a/examples/foundational/24-stt-mute-filter.py +++ b/examples/foundational/24-stt-mute-filter.py @@ -122,7 +122,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/25-google-audio-in.py b/examples/foundational/25-google-audio-in.py index af6e267dc..e3ff21d95 100644 --- a/examples/foundational/25-google-audio-in.py +++ b/examples/foundational/25-google-audio-in.py @@ -354,7 +354,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/26-gemini-multimodal-live.py b/examples/foundational/26-gemini-multimodal-live.py index 62ea5d5f0..71d41304b 100644 --- a/examples/foundational/26-gemini-multimodal-live.py +++ b/examples/foundational/26-gemini-multimodal-live.py @@ -63,7 +63,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/26a-gemini-multimodal-live-transcription.py b/examples/foundational/26a-gemini-multimodal-live-transcription.py index ae48ce31b..aa07ace93 100644 --- a/examples/foundational/26a-gemini-multimodal-live-transcription.py +++ b/examples/foundational/26a-gemini-multimodal-live-transcription.py @@ -89,7 +89,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/26b-gemini-multimodal-live-function-calling.py b/examples/foundational/26b-gemini-multimodal-live-function-calling.py index 03e3096a3..14f2d62c7 100644 --- a/examples/foundational/26b-gemini-multimodal-live-function-calling.py +++ b/examples/foundational/26b-gemini-multimodal-live-function-calling.py @@ -120,7 +120,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/26c-gemini-multimodal-live-video.py b/examples/foundational/26c-gemini-multimodal-live-video.py index 0beac44c9..4ec8663c4 100644 --- a/examples/foundational/26c-gemini-multimodal-live-video.py +++ b/examples/foundational/26c-gemini-multimodal-live-video.py @@ -79,7 +79,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/26d-gemini-multimodal-live-text.py b/examples/foundational/26d-gemini-multimodal-live-text.py index b243399e9..2e0e27a13 100644 --- a/examples/foundational/26d-gemini-multimodal-live-text.py +++ b/examples/foundational/26d-gemini-multimodal-live-text.py @@ -106,7 +106,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/26e-gemini-multimodal-google-search.py b/examples/foundational/26e-gemini-multimodal-google-search.py index 84a48d026..7bfd017d1 100644 --- a/examples/foundational/26e-gemini-multimodal-google-search.py +++ b/examples/foundational/26e-gemini-multimodal-google-search.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Daily +# Copyright (c) 2024-2025, Daily # # SPDX-License-Identifier: BSD 2-Clause License # @@ -34,7 +34,7 @@ search_tool = {"google_search": {}} tools = [search_tool] system_instruction = """ -You are an expert at providing the most recent news from any place. Your responses will be converted to audio, so avoid using special characters or overly complex formatting. +You are an expert at providing the most recent news from any place. Your responses will be converted to audio, so avoid using special characters or overly complex formatting. Always use the google search API to retrieve the latest news. You must also use it to check which day is today. @@ -93,7 +93,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/27-simli-layer.py b/examples/foundational/27-simli-layer.py index 2d8026bc4..cbef6d4a5 100644 --- a/examples/foundational/27-simli-layer.py +++ b/examples/foundational/27-simli-layer.py @@ -83,7 +83,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, ), diff --git a/examples/foundational/28a-transcription-processor-openai.py b/examples/foundational/28a-transcription-processor-openai.py index d432c35f2..f341cc0dd 100644 --- a/examples/foundational/28a-transcription-processor-openai.py +++ b/examples/foundational/28a-transcription-processor-openai.py @@ -150,7 +150,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/28b-transcript-processor-anthropic.py b/examples/foundational/28b-transcript-processor-anthropic.py index 5b45a9c3d..05956fdf7 100644 --- a/examples/foundational/28b-transcript-processor-anthropic.py +++ b/examples/foundational/28b-transcript-processor-anthropic.py @@ -150,7 +150,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/28c-transcription-processor-gemini.py b/examples/foundational/28c-transcription-processor-gemini.py index 841be0b98..3760a227f 100644 --- a/examples/foundational/28c-transcription-processor-gemini.py +++ b/examples/foundational/28c-transcription-processor-gemini.py @@ -178,7 +178,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/30-observer.py b/examples/foundational/30-observer.py index a6be27b97..49885d82c 100644 --- a/examples/foundational/30-observer.py +++ b/examples/foundational/30-observer.py @@ -117,7 +117,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/foundational/31-heartbeats.py b/examples/foundational/31-heartbeats.py index fbb959519..2487c13e7 100644 --- a/examples/foundational/31-heartbeats.py +++ b/examples/foundational/31-heartbeats.py @@ -32,7 +32,7 @@ async def main(): pipeline = Pipeline([NullProcessor()]) - task = PipelineTask(pipeline, PipelineParams(enable_heartbeats=True)) + task = PipelineTask(pipeline, params=PipelineParams(enable_heartbeats=True)) runner = PipelineRunner() diff --git a/examples/foundational/32-gemini-grounding-metadata.py b/examples/foundational/32-gemini-grounding-metadata.py index 67694652f..516549694 100644 --- a/examples/foundational/32-gemini-grounding-metadata.py +++ b/examples/foundational/32-gemini-grounding-metadata.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2024, Daily +# Copyright (c) 2024-2025, Daily # # SPDX-License-Identifier: BSD 2-Clause License # @@ -38,7 +38,7 @@ search_tool = {"google_search_retrieval": {}} tools = [search_tool] system_instruction = """ -You are an expert at providing the most recent news from any place. Your responses will be converted to audio, so avoid using special characters or overly complex formatting. +You are an expert at providing the most recent news from any place. Your responses will be converted to audio, so avoid using special characters or overly complex formatting. Always use the google search API to retrieve the latest news. You must also use it to check which day is today. @@ -117,7 +117,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/foundational/33-gemini-rag.py b/examples/foundational/33-gemini-rag.py index 72a246cc6..b4d70093a 100644 --- a/examples/foundational/33-gemini-rag.py +++ b/examples/foundational/33-gemini-rag.py @@ -230,7 +230,7 @@ Your response will be turned into speech so use only simple words and punctuatio ) task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/news-chatbot/server/news_bot.py b/examples/news-chatbot/server/news_bot.py index a34b0c3d0..d1cde2f22 100644 --- a/examples/news-chatbot/server/news_bot.py +++ b/examples/news-chatbot/server/news_bot.py @@ -140,7 +140,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams(allow_interruptions=True), + params=PipelineParams(allow_interruptions=True), observers=[GoogleRTVIObserver(rtvi)], ) diff --git a/examples/patient-intake/bot.py b/examples/patient-intake/bot.py index 9efff46d3..75279fce3 100644 --- a/examples/patient-intake/bot.py +++ b/examples/patient-intake/bot.py @@ -346,7 +346,7 @@ async def main(): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=False)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=False)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/phone-chatbot/bot_daily.py b/examples/phone-chatbot/bot_daily.py index 16aba1b82..c3468bbed 100644 --- a/examples/phone-chatbot/bot_daily.py +++ b/examples/phone-chatbot/bot_daily.py @@ -150,7 +150,7 @@ async def main( ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) if dialout_number: logger.debug("dialout number detected; doing dialout") diff --git a/examples/phone-chatbot/bot_daily_gemini.py b/examples/phone-chatbot/bot_daily_gemini.py index b36313c5a..96f6506b6 100644 --- a/examples/phone-chatbot/bot_daily_gemini.py +++ b/examples/phone-chatbot/bot_daily_gemini.py @@ -271,7 +271,7 @@ DO NOT say anything until you've determined if this is a voicemail or human.""" task = PipelineTask( pipeline, - PipelineParams(allow_interruptions=True), + params=PipelineParams(allow_interruptions=True), ) if dialout_number: diff --git a/examples/phone-chatbot/bot_twilio.py b/examples/phone-chatbot/bot_twilio.py index 9da28dfa1..3aab6a6d8 100644 --- a/examples/phone-chatbot/bot_twilio.py +++ b/examples/phone-chatbot/bot_twilio.py @@ -77,7 +77,7 @@ async def main(room_url: str, token: str, callId: str, sipUri: str): ] ) - task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) + task = PipelineTask(pipeline, params=PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): diff --git a/examples/sentry-metrics/bot.py b/examples/sentry-metrics/bot.py index 0282c7905..89cd8dcf3 100644 --- a/examples/sentry-metrics/bot.py +++ b/examples/sentry-metrics/bot.py @@ -90,7 +90,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams(allow_interruptions=True, enable_metrics=True), + params=PipelineParams(allow_interruptions=True, enable_metrics=True), ) @transport.event_handler("on_first_participant_joined") diff --git a/examples/simple-chatbot/server/bot-gemini.py b/examples/simple-chatbot/server/bot-gemini.py index f80a9770e..753cb2af7 100644 --- a/examples/simple-chatbot/server/bot-gemini.py +++ b/examples/simple-chatbot/server/bot-gemini.py @@ -172,7 +172,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/simple-chatbot/server/bot-openai.py b/examples/simple-chatbot/server/bot-openai.py index e1d7bb9a0..a5e4312ab 100644 --- a/examples/simple-chatbot/server/bot-openai.py +++ b/examples/simple-chatbot/server/bot-openai.py @@ -198,7 +198,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/storytelling-chatbot/src/bot.py b/examples/storytelling-chatbot/src/bot.py index f7edbe1d8..92ab7d617 100644 --- a/examples/storytelling-chatbot/src/bot.py +++ b/examples/storytelling-chatbot/src/bot.py @@ -104,7 +104,7 @@ async def main(room_url, token=None): main_task = PipelineTask( main_pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=True, enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/studypal/studypal.py b/examples/studypal/studypal.py index 0b1496e3d..1ec1d4aa4 100644 --- a/examples/studypal/studypal.py +++ b/examples/studypal/studypal.py @@ -155,8 +155,10 @@ Your task is to help the user understand and learn from this article in 2 senten task = PipelineTask( pipeline, - PipelineParams( - audio_out_sample_rate=44100, allow_interruptions=True, enable_metrics=True + params=PipelineParams( + audio_out_sample_rate=44100, + allow_interruptions=True, + enable_metrics=True, ), ) diff --git a/examples/translation-chatbot/bot.py b/examples/translation-chatbot/bot.py index 5839afb5d..dc1d05f3d 100644 --- a/examples/translation-chatbot/bot.py +++ b/examples/translation-chatbot/bot.py @@ -183,7 +183,7 @@ async def main(): task = PipelineTask( pipeline, - PipelineParams( + params=PipelineParams( allow_interruptions=False, # We don't want to interrupt the translator bot enable_metrics=True, enable_usage_metrics=True, diff --git a/examples/twilio-chatbot/bot.py b/examples/twilio-chatbot/bot.py index 8d6f813ed..afddc3fe9 100644 --- a/examples/twilio-chatbot/bot.py +++ b/examples/twilio-chatbot/bot.py @@ -108,7 +108,9 @@ async def run_bot(websocket_client: WebSocket, stream_sid: str, testing: bool): task = PipelineTask( pipeline, params=PipelineParams( - audio_in_sample_rate=8000, audio_out_sample_rate=8000, allow_interruptions=True + audio_in_sample_rate=8000, + audio_out_sample_rate=8000, + allow_interruptions=True, ), ) diff --git a/examples/twilio-chatbot/client.py b/examples/twilio-chatbot/client.py index cc7e7be36..c4b02c0d2 100644 --- a/examples/twilio-chatbot/client.py +++ b/examples/twilio-chatbot/client.py @@ -142,7 +142,9 @@ async def run_client(client_name: str, server_url: str, duration_secs: int): task = PipelineTask( pipeline, params=PipelineParams( - audio_in_sample_rate=8000, audio_out_sample_rate=8000, allow_interruptions=True + audio_in_sample_rate=8000, + audio_out_sample_rate=8000, + allow_interruptions=True, ), ) diff --git a/examples/websocket-server/bot.py b/examples/websocket-server/bot.py index 9a0de15c6..d44c77df8 100644 --- a/examples/websocket-server/bot.py +++ b/examples/websocket-server/bot.py @@ -125,7 +125,9 @@ async def main(): task = PipelineTask( pipeline, params=PipelineParams( - audio_in_sample_rate=16000, audio_out_sample_rate=16000, allow_interruptions=True + audio_in_sample_rate=16000, + audio_out_sample_rate=16000, + allow_interruptions=True, ), ) diff --git a/src/pipecat/pipeline/task.py b/src/pipecat/pipeline/task.py index da18cca5d..9e6b313a6 100644 --- a/src/pipecat/pipeline/task.py +++ b/src/pipecat/pipeline/task.py @@ -131,6 +131,7 @@ class PipelineTask(BaseTask): def __init__( self, pipeline: BasePipeline, + *, params: PipelineParams = PipelineParams(), observers: List[BaseObserver] = [], clock: BaseClock = SystemClock(),