Voice AI demands something most AI applications don't: real-time response. When a patient calls a clinic, or a customer calls support, every millisecond of silence feels like an eternity. Our challenge was clear — reduce LLM inference latency from 800ms to under 100ms without sacrificing output quality.
The Problem: 800ms Is Too Slow
Our initial voice agent prototype used a standard transformer architecture served via a generic inference endpoint. The round-trip time from speech-to-text, through the LLM, to text-to-speech was averaging 1.2 seconds. Users perceived this as laggy and unnatural.
We broke the latency budget down:
- Speech-to-Text: ~150ms
- LLM Inference: ~800ms (the bottleneck)
- Text-to-Speech: ~250ms
Strategy 1: Model Quantization (INT8/INT4)
We applied post-training quantization using GPTQ to convert our fine-tuned model from FP16 to INT4. This reduced model size by 4x and inference time by roughly 60%, with only a 1.2% degradation in output quality on our evaluation benchmark.
Key insight: For voice interactions, the quality bar is different from text. Users tolerate slight rephrasing but not latency. This made quantization a clear win.
Strategy 2: Speculative Decoding
We implemented speculative decoding using a smaller draft model (1.3B params) to predict likely continuations, then verified them in parallel with the main model (7B params). This gave us a 2-3x speedup on autoregressive generation with zero quality loss.
Strategy 3: KV-Cache Optimization
Voice conversations are multi-turn by nature. Instead of recomputing the full context window on each turn, we implemented persistent KV-cache that carries conversation state across turns. This eliminated redundant computation and cut per-turn latency by 40%.
Strategy 4: Edge Deployment with TensorRT
Moving from cloud-hosted inference to edge nodes running TensorRT-optimized models eliminated network round-trip entirely for latency-critical paths. We deployed inference containers on NVIDIA L4 GPUs at edge locations, bringing total LLM latency to 65ms.
Results
After applying all four strategies, our production voice pipeline achieves:
- LLM inference: 65ms (down from 800ms)
- Full voice round-trip: 280ms (down from 1.2s)
- Quality retention: 98.8% on internal benchmarks
- User satisfaction: NPS increased from 42 to 78
What We Learned
The biggest lesson: latency optimization is not a single technique — it's a stack of complementary approaches. Quantization alone gets you 60% of the way. Speculative decoding adds another 2-3x. KV-cache removes redundancy. Edge deployment eliminates network overhead. Together, they compound.
For teams building real-time AI applications, our recommendation is: start with quantization (lowest effort, highest impact), then work down the stack based on your latency budget and quality requirements.
"Reducing LLM Latency for Real-time Voice Interaction represents a significant milestone in our ongoing search for excellence. Implementing these strategies has fundamentally shifted our operational efficiency."
Recapi Team
Expert Insights



