examples(foundational): use RunnerArgs.pipeline_idle_timeout_secs

This commit is contained in:
Aleix Conchillo Flaqué
2025-08-06 19:38:06 -07:00
parent 38951aab56
commit 786f24c9db
140 changed files with 202 additions and 21 deletions

View File

@@ -41,7 +41,10 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady
)
task = PipelineTask(Pipeline([tts, transport.output()]))
task = PipelineTask(
Pipeline([tts, transport.output()]),
idle_timeout_secs=runner_args.pipeline_idle_timeout_secs,
)
# Register an event handler so we can play the audio when the client joins
@transport.event_handler("on_client_connected")