The inference modality has no standalone typed client. It uses the Voice surface. You attach a speech-to-speech agent to a call with voice.agents.attach. You configure turn detection and the model codec. Optionally, you tap the audio bridge. This page is the inference-relevant slice of the Voice SDK plus the turn-detection knobs.
A dedicated typed Inference client is Preview. See the bottom of this page. For shipping code today, use the Voice surface documented here.

Import

The agent path lives on the voice subpath:
Go, Rust, Java, and .NET bindings expose the same shapes (snake_case in Python, PascalCase methods in Go/.NET).

voice.agents.attach

Bind a speech-to-speech agent to a live call or a just-originated call. The runtime bridges the call’s uplink / downlink audio tracks to the model. It owns turn-taking for the duration of the call.
string
required
The call sid to bind the agent to, from originate() or an inbound answer.
string | AgentSpec
required
Either an agent id (string) registered in the control plane, or an inline agent spec. The spec selects the speech-to-speech model and its turn-detection config.
Returns Promise<void>. It resolves after the agent is bridged. Audio starts to flow immediately. Turn detection gates the first agent utterance.

Attaching at originate time

originate accepts an agent directly, so the common case is one call:

The agent spec

An inline AgentSpec selects the model leg and the turn-detection policy. The shape mirrors the agent config that the control plane stores.
ClutchCall resamples between the caller leg rate (commonly 8 kHz on PSTN) and the model’s inputRateHz / outputRateHz. You set the model’s rates. The bridge handles the caller leg.

Turn detection

The TurnDetection block is the heart of this modality. It owns the client-commit gate, backchannel suppression, and hold-and-confirm barge-in. Put it in the agent spec, or set it server-side in the agent config.
silenceThresholdMs below ~300 fires end-of-turn on inter-word pauses. The agent will interrupt the caller mid-sentence. Keep it at or above 300.

Tools

Declare function-calling tools on the agent. The model can then invoke them mid-conversation. ClutchCall runs the call and feeds the structured result back to the model. Put a tools array in the agent spec. The shape mirrors the operator tool config that the control plane stores. See Agent DAGs for the full operator spec.
"http" | "mcp" | "client"
required
http calls an arbitrary HTTP(S) endpoint. mcp sends a JSON-RPC 2.0 tools/call to a remote MCP server. client is scaffolded. The tool is advertised and the call is parsed, but invoke returns not_yet_plumbed today.
string
required
The tool name that the model sees. It must be unique per agent. On a name collision, it overrides a built-in telephony tool of the same name.
string
required
Plain-language description of what the tool does and when to use it. This is what the model reasons over when it decides to call the tool.
boolean
default:"false"
When false, the model can narrate the call (“let me look that up”). When true, it stays quiet until it has the result.
string
required
HTTP method, for example GET or POST.
string
required
Endpoint URL. Supports {{argument}} substitution from the model’s tool arguments, for example https://api.example.com/orders/{{order_id}}.
Record<string, string>
Request headers. Values support the same {{argument}} substitution as the URL.
ToolAuth
{ type: "bearer", token }, { type: "basic", user, pass }, or a custom header { type: "header", name, value }.
JsonSchema
required
A JSON-schema object (type / properties / required) that describes the tool’s arguments. The model fills these in. They drive the {{argument}} substitution.
number
default:"10000"
Per-call timeout in milliseconds. Invokes run synchronously within the model turn, so keep this tight.
Tool invokes are synchronous within the model turn. A slow upstream eats the turn budget, and the caller hears dead air. Keep individual tools fast. Or split the work across multiple turns instead of cascaded tool calls inside one turn.
Every agent also advertises a set of built-in telephony tools (transfer, hold, DTMF, and more) with no configuration. Tools that you declare here are operator tools. They override a built-in tool on a name collision.

Tapping the audio bridge (optional)

You usually do not touch raw frames. The runtime bridges the model leg for you. When you need to observe or inject audio (a recording sidecar, custom DSP), attach the Voice AudioBridge to the same call.
AudioBridge methods relevant here: See Voice — SDK Methods for the full AudioBridge surface.

Events

The agent leg shows turn-boundary and barge events through the call’s status stream. Subscribe with the Voice call handle:

Preview: a dedicated typed Inference client

Preview. A standalone Inference client is in design. It is a typed handle that wraps agent attach, the commit gate, and audio bridging behind one object. The shape below is forward-looking and can change. For shipping code, attach via voice.agents.attach as shown above.