We present a technical tutorial for building enterprise-grade realtime voice agents from first principles. While end-to-end speech-to-speech models may ultimately provide the best latency for voice agents, fully self-hosted end-to-end solutions are not yet available. We evaluate the closest candidate, Qwen3-Omni, across three configurations: its cloud-only DashScope Realtime API achieves ∼702ms audio-to-audio latency with streaming, but is not self-hostable; its local vLLM deployment supports only the Thinker (text generation from audio, 516ms), not the Talker (audio synthesis); and its local Transformers deployment runs the full pipeline but at ∼146s -- far too slow for realtime. The cascaded streaming pipeline (STT → LLM → TTS) therefore remains the practical architecture for self-hosted realtime voice agents, and the focus of this tutorial. We build a complete voice agent using Deepgram (streaming STT), vLLM-served LLMs with function calling (streaming text generation), and ElevenLabs (streaming TTS), achieving a measured time-to-first-audio of 755ms (best case 729ms) with full function calling support. We release the full codebase as a 9-chapter progressive tutorial with working, tested code for every component.
Figures & tables
Model
Level
Size
FC
FD
Streaming
License
Moshi [ 4 ]
1
7B
✗
✓
✓
CC-BY
Qwen3-Omni [ 18 ]
2
30B
✓
✗
✓ †
Apache 2.0
Qwen2.5-Omni [ 26 ]
2
7B
✗
✗
Partial
Apache 2.0
GLM-4-Voice [ 27 ]
2
9B
✗
✗
✓
Apache 2.0
Kimi-Audio [ 14 ]
2
7B
✗
✗
✓
–
Step-Audio [ 23 ]
2
130B
✗
✗
✓
Apache 2.0
Table 1: Representative speech-to-speech models with open weights. “FC” = function calling support. “FD” = full-duplex. “Streaming” = supports incremental audio output. † Streaming audio via DashScope Realtime API; local vLLM supports text streaming only (Thinker).
Mode
Inference Time
Audio Duration
RTF
Text only
0.71s
–
–
Text + Audio
26.5s
13.8s
1.93 ×
Text + Audio (per sentence)
13.2s
6.8s
1.94 ×
Table 2: Qwen2.5-Omni-7B inference latency on a single NVIDIA H200 GPU.
Configuration
TTFT
TTFA
tok/s
FC
Audio Out
vLLM Thinker (1 × H200)
48ms
516ms ∗
168
✓
✗
Transformers full (1 × H200)
–
145,694ms
4.6
✓
✓ (2.91 × RTF)
DashScope Realtime API
449ms
702ms
–
Partial
✓ (streaming)
Table 3: Qwen3-Omni inference latency across deployment configurations. TTFT = time-to-first-text, TTFA = time-to-first-audio, FC = function calling.
Component
P50
Mean
Min
Max
With cloud OpenAI API (GPT-4.1-mini)
Deepgram STT
402
407
184
601
LLM TTFT
457
622
278
784
ElevenLabs TTS TTFB
221
226
216
253
Est. E2E TTFA
958
1054
715
1606
With self-hosted vLLM (Qwen2.5-7B-Instruct on H200)