Stack layer map

The four layers of every voice agent stack

Speech-to-text, the reasoning core, text-to-speech, and transport. What goes in each slot, why Vapi and Twilio are not the same layer, and where the layers leak.

Maksym BondarenkoSystems & Automation Engineering, Azuro AILast updated
4 layersTool versions checked 16 Nov 2026Dated per entry

Every voice agent has four parts: speech-to-text to hear the caller, a reasoning core to decide what to do, text-to-speech to speak back, and a transport layer to carry the call. Vapi and Twilio are not alternatives to each other. Twilio is the transport layer. Vapi is an orchestrator that sits across all four.

The most common confusion when people start comparing voice tools is treating the whole category as one shopping list. Vapi, Twilio, ElevenLabs, Deepgram and LiveKit get put side by side as if you pick one. You do not. Several of them are doing completely different jobs, and two of them are not even in the same part of the diagram. Here is the map, with what currently goes in each slot and where the layers stop being as independent as a diagram suggests.


What are the four layers?

   Caller on a phone or a browser
             |
   +---------v--------------------------------------+
   |  4. TRANSPORT -- carries the audio              |
   |     Twilio - SIP trunk - WebRTC - a Vapi number |
   +---------+--------------------------------------+
             | audio in                    audio out ^
   +---------v--------------+      +-----------------+------+
   |  1. SPEECH-TO-TEXT      |      |  3. TEXT-TO-SPEECH     |
   |     hears the caller    |      |     speaks the reply   |
   |     Deepgram - Soniox   |      |     ElevenLabs -       |
   |     AssemblyAI - Reson8 |      |     Cartesia - Rime    |
   +---------+--------------+      +-----------------^------+
             | text                            text  |
   +---------v---------------------------------------+------+
   |  2. THE REASONING CORE -- decides and calls tools        |
   |     GPT - Claude - Gemini, plus your tool definitions    |
   +-------------------------+---------------------------------+
                             | tool calls
                   +---------v---------+
                   |  your backend      |
                   |  calendar, CRM, DB |
                   +--------------------+

   Sitting ACROSS all four, not inside one:
   ORCHESTRATORS -- Vapi - LiveKit Agents - Pipecat

The orchestrator row is the part most comparisons get wrong. Vapi and LiveKit Agents are not the speech layer or the model layer. They are the thing that holds the four layers together, manages turn-taking, and lets you swap any single slot without rewriting the other three.

Why are Vapi and Twilio not the same thing?

Because one carries the call and the other decides what happens during it.

Twilio is transport. It owns the phone number, the SIP connection, and the audio stream. It has no opinion about what your agent says. Vapi is orchestration. It wires speech-to-text to a model to text-to-speech, manages whose turn it is to talk, and calls your tools mid-conversation. It can use Twilio as its transport, or provide a number itself.

So the real question is never "Vapi or Twilio." It is: do I want to assemble the four layers myself, or have an orchestrator do it? If an orchestrator, do I want a managed one (Vapi) or a framework I run (LiveKit Agents, Pipecat)? Which transport do I need — a real phone number, a SIP trunk into an existing phone system, or WebRTC in a browser? Those three answers determine your stack. "Vapi vs Twilio" determines nothing.

What goes in the speech-to-text layer?

This is the layer that decides whether your agent understands people with accents, in noisy rooms, on bad lines. It matters more than the model choice and gets a fraction of the attention. Options available on Vapi as of the week of 9 November 2026:

OptionNote
Soniox stt-rt-v6Added 9 Nov 2026. See the echo detail below — the most interesting thing in this layer right now
Reson8Added 9 Nov 2026. Multiple candidate languages, keyterms, custom models, turn-detection settings. Bring Vapi's key or your own
Deepgram nova-3, nova-3-pharmanova-3-pharma added for pharmaceutical vocabulary
AssemblyAI Universal 3.5 ProAlso usable on HIPAA-enabled assistants
OpenAI gpt-transcribeSupports keywords and a guiding prompt
Soniox stt-rt-v5Earlier model; has a configurable low-confidence filter to discard weak transcripts
The detail worth stealing

Soniox stt-rt-v6 on Vapi does something the layer diagram does not predict: as the assistant speaks, Vapi streams the assistant's own words to Soniox, so it can filter out echo and interpret the caller in the context of what was just said. Vapi's stated result is more accurate transcripts and fewer misheard turns. That is layer 1 being fed information from layer 3 — which is the whole point of the "where layers leak" section below.

What goes in the reasoning core?

The model, plus your tool definitions. This is the layer everyone shops for first and the one that is least often the bottleneck. Current options on Vapi, with the dates they appeared:

  • Claude Sonnet 4.6 on Amazon Bedrock via the global cross-region profile, with your own AWS credentials — 9 Nov 2026.
  • Claude Haiku 5.5 for assistants and squads, with a reasoning-effort control, selectable as an eval judge model.
  • Gemini 3.8 Flash.
  • OpenAI GPT-6 Luna (gpt-6-luna) — 5 Oct 2026, with model-specific pricing, reasoning support, and a fast service tier.
  • GPT-5.6 / GPT-5.5 with serviceTier: fast to request faster processing for latency-sensitive calls — 21 Sep 2026.

The fork in the road. There is now a second shape entirely: realtime speech-to-speech models. GPT-Live on Vapi collapses layers 1, 2 and 3 into one model that takes audio and returns audio. Nine new GPT-Live voices shipped recently, it accepts keypad (DTMF) input on phone calls, and Google Calendar, Google Sheets and Slack tools now run on its reasoner. That is a genuinely different architecture, not a faster version of the same one. You trade the ability to swap each slot — and to inspect the transcript between layers — for lower latency and a more natural interruption feel. Worth knowing before you design around four layers that your stack might only have two.

What goes in the text-to-speech layer?

The layer that decides whether people believe they are talking to a person.

  • ElevenLabs — eleven_v4 and eleven_v4_turbo (v4 Turbo on Vapi since 5 Oct 2026).
  • Cartesia — sonic-3.6.
  • Rime — supports a custom lexicon, which matters when your agent has to pronounce product or street names correctly.
  • NVIDIA — note its output is restricted to LINEAR_PCM in current LiveKit Agents, which will break other encoding configs.
  • Respeecher, CambAI (with a speaking-rate option), Microsoft AI.
An operational detail that bites people in production

Multichannel TTS fallback. If your voice provider has a bad minute, the agent either goes silent or fails over. LiveKit Agents 1.8.12 (13 November 2026) specifically improved multichannel TTS fallback. If you are assembling this yourself, fallback is your job and it is not optional — a silent agent on a live call is worse than a slightly different voice.

What goes in the transport layer?

How the audio actually reaches you.

  • Twilio — the default answer for a real phone number, and what most production phone agents sit on.
  • SIP trunk — when the business already has a phone system you must integrate with rather than replace. Vapi supports configurable blind-transfer fallbackPlan, SIP verb, and dial timeout, with cold-transfer outcomes in call logs.
  • WebRTC — browser and in-app voice. This is LiveKit's native territory.
  • A number from your orchestrator — Vapi will sell you one, which is the fastest path to a working demo and the one that is hardest to migrate off later.

Where do the layers leak?

Two places, and both cost real debugging time.

1. Speech-to-text needs to know what text-to-speech just said. Otherwise the agent transcribes its own voice as caller speech. That is what the Soniox stt-rt-v6 assistant-context streaming above is solving. If you are assembling the stack yourself and your agent interrupts itself or responds to things nobody said, this is your first suspect.

2. Turn-taking is nobody's layer and everybody's problem. Knowing when the caller has finished is a judgement that depends on the transcriber's endpointing, a voice-activity detector, and the orchestrator's own logic at once. The evidence that this is genuinely hard is how much work goes into it: Vapi exposes Soniox endpoint sensitivity and endpoint-latency adjustment as tunable settings, Reson8 ships with turn-detection settings and its LiveKit plugin does server-side turn detection, and LiveKit Agents 1.8.12 improved STT timing and transcript synchronisation, fixing ending a turn on a late speech-to-text final arriving after a later end-of-speech event. That last fix is the shape of the whole problem: two signals about the same moment arriving out of order.

What does one of these look like wired up for real?

One voice agent in production, built for a real client:

Twilio number -> Vapi assistant -> webhook -> n8n -> Cal.com (availability,
                                                  conflict check, booking)
                                              -> Twilio / SMTP (notify owner)
                                              -> Supabase (contacts, call logs)
                                              -> BetterStack (errors)

Four layers filled by: Twilio for transport, Vapi as orchestrator holding the speech and model layers, and a separate orchestration workflow for the business logic the agent calls into. Eleven tools, one of which resolves a document knowledge base inside Vapi's own infrastructure with no round-trip to the backend. The full tools schema, the n8n wiring, and the failure that let the agent cancel a booking instead of hanging up are in the Vapi voice agent starter on this site.

If you are assembling it yourself instead

LiveKit Agents is the main framework for running your own stack rather than buying an orchestrator. Version 1.8.12 shipped 13 November 2026 and improved realtime history and reconnection, task handoffs, speech-to-text timing, transcript synchronisation, voice-activity-detector updates on Python 3.14, worker cleanup, and multichannel TTS fallback.

Two things in that list are tells about what running your own stack actually involves: reconnection and worker cleanup. Neither is a feature you want. Both are things you have to get right because calls drop and processes leak, and an orchestrator would have hidden them from you. A 2.0.0b1 beta also exists on PyPI (12 October 2026), so a major version is in progress.

What about ElevenLabs' agent platform?

ElevenLabs is moving up the stack from the text-to-speech slot into orchestration, and at its Summit NYC on 11 November 2026 it previewed three things aimed squarely at that: Interaction Engine (handles turn-taking and interruptions, routing each step to a different model — a cheap one for triage, a frontier one for the hard parts), Memory in ElevenAgents (a structured record per returning authenticated customer), and Routines in ElevenAgents (multi-step automation before, during, and after a conversation).

None of these three were generally available on announcement day

ElevenLabs' own write-up uses future tense throughout — Memory "will let" agents build a record, Routines "will allow" multi-step work — and Interaction Engine was explicitly previewed on stage with no release date attached. A real signal about where this layer is heading, and not something you can put in a stack you are building this week. If per-step model routing is what you need today, that is a thing an orchestrator plus your own routing logic already does.

Frequently asked questions

FAQ

Is Vapi the same as Twilio?

  • No, and they are not alternatives. Twilio is the transport layer that carries the call audio. Vapi is an orchestrator that connects speech-to-text, a reasoning model, and text-to-speech, and it can use Twilio as its transport.
FAQ

Do I need all four layers?

  • Conceptually yes, but they may not be four separate vendors. A realtime speech-to-speech model such as GPT-Live collapses speech-to-text, reasoning, and text-to-speech into one, leaving you with two moving parts instead of four. You trade swappability and visibility of the intermediate transcript for latency.
FAQ

Which layer should I spend the most time on?

  • Speech-to-text and turn-taking, which is the opposite of where most people start. A great model that mishears the caller, or that talks over them, produces a worse call than an average model that listens properly.
FAQ

What is the difference between Vapi and LiveKit Agents?

  • Both are orchestrators. Vapi is managed — you configure it and it runs. LiveKit Agents is a framework you run yourself, which means you own reconnection, worker lifecycle, and fallback, and you get full control in exchange.
FAQ

Can I swap one layer without rebuilding?

  • That is the main argument for the four-layer shape. If speech-to-text is your weak point, you change that provider and the other three layers do not care. It is also the main thing you give up by choosing a single realtime model.

Want this built and running instead of evaluated?

Happy to talk through which layers you'd actually need — no pitch, just answers.

Azuro AI · Built from our own production n8n workflows and engineering notes. Client names, tenant identifiers, credential IDs and endpoints have been removed. Every incident described is real and dated in our internal records.