connect

suspend fun connect(model: String, config: RealtimeVoiceConfig, correlationId: String? = null, scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default)): RealtimeSession

Open a new realtime session.

The returned RealtimeSession owns the underlying transport; the broker itself is reusable across many concurrent sessions.

Parameters

scope

Coroutine scope used to launch the session's reader and tool-dispatch coroutines. A reasonable default of SupervisorJob() + Dispatchers.Default is used when omitted; supply an explicit scope to tie the session lifetime to your application's structured concurrency.