Infrastructure · July 27, 2026 · 6 min read
Twilio built a $4 billion business selling real-time communications as a bundled API: voice, video, SMS, and messaging under one dashboard, one invoice, one support queue. Twilio is not unusual. Vonage, Bandwidth, and Agora all operate on the same model — a platform that owns the media path, the signaling, the billing, and the customer relationship.
That model works when the buyer is a developer building a call center widget. It stops working when the buyer is a machine that needs a 90-second voice session to transcribe audio and respond with synthesized speech — and needs to pay for that session per minute, not per seat per month.
WebRTC is the protocol that makes real-time peer-to-peer media work in browsers. It is an open standard, not a product. The question is not whether WebRTC can carry voice traffic — it can, and does, at scale. The question is who owns the infrastructure that hosts it, who settles the payment for the time used, and whether that infrastructure can be consumed by an autonomous agent rather than a human with a credit card.
WebRTC sessions between two parties are straightforward. Sessions involving multiple participants, recording, transcription, or text-to-speech injection require a Selective Forwarding Unit (SFU). The SFU receives media from each participant, routes it to the other participants, and can optionally branch it to processing pipelines — speech-to-text, text-to-speech, voice activity detection.
We run LiveKit as our SFU, version 1.13.4, on a dedicated host. LiveKit is open-source; it speaks standard WebRTC, does not require a proprietary client library, and exposes a clean server SDK for room management and token minting. The voice agent connects outbound to the SFU over a TLS-secured WebSocket. Clients connect to wss://livekit.ai-rook.com — a public endpoint behind Let's Encrypt, pinned to a dedicated nginx listener to avoid port conflicts with other services on the same host.
The architecture separates media transport from business logic. The SFU handles the real-time path. A separate process handles the pipeline: incoming audio goes to a local speech-to-text model (Parakeet, running on dedicated inference hardware at 48kHz), transcripts pass to the language model, and the response is synthesized through a local TTS engine (Kokoro, also at 48kHz native output). No cloud API calls in the media path. No per-seat licensing.
The traditional pricing model for voice infrastructure is per-seat-per-month or per-minute with a minimum commitment. These models assume a human caller who occupies the line for minutes at a time and generates predictable volume. Machine-to-machine voice sessions are different: they are short, frequent, and bursty. An agent might need three 30-second voice turns to resolve a query, then go idle for twenty minutes.
Per-minute pricing with no minimums is the natural fit. We settled on the following rate card:
At these rates, a 90-second voice interaction — media transport, transcription, and synthesis — costs the buyer under $0.01. That is sub-cent for a full voice conversation turn. Card interchange alone would make the transaction uneconomical.
The payment flows through our x402 layer: the buyer's wallet signs a payment intent at POST /audio/v1/room, the server reserves credit against the session, mints a LiveKit JWT granting access to the room, and the metering runs against the reserved balance. When the session ends, the final settlement matches actual usage. Refund policy is explicit: if the service fails before delivering any output, the buyer receives a full refund. Partial delivery triggers a pro-rata calculation based on output bytes verified against the session receipt hash.
Running speech-to-text and text-to-speech on dedicated hardware instead of cloud APIs is not an ideological choice. It is a cost structure decision. Cloud TTS APIs charge $4–$15 per million characters. Cloud STT APIs charge $0.006–$0.036 per minute. Running Parakeet and Kokoro on a Mac Studio with a 256GB memory tier and a 48kHz inference pipeline reduces the marginal compute cost to essentially electricity. The per-minute STT price of $0.0045 covers hardware depreciation and hosting, not per-call API fees.
This matters at the x402 layer because the buyer is comparing the cost of our voice endpoint against the cost of calling Google's or Amazon's speech API directly. If our endpoint costs more than the cloud alternative, there is no reason to route through us. Local inference keeps the price below the cloud floor while keeping the media path — and the settlement — on our infrastructure.
Decentralized WebRTC is not about replacing Zoom or Teams. It is about providing media infrastructure as a metered, settleable service that machines can consume without a corporate procurement process. The buyer does not need a Twilio account. The buyer needs a wallet that can sign a 402 payment intent.
As machine-to-machine voice interactions become more common — agents that call other agents, voice interfaces that respond in real time, transcription pipelines that process live audio feeds — the demand for infrastructure that prices by the minute and settles on-chain will grow. The protocols are standard. The models are open. What was missing was the payment and settlement layer. x402 provides it.
The voice agent is live at agents.ai-rook.com. Service documentation is available at agents.ai-rook.com/llms.txt.