what is the ideal stt+llm+tts setup which offers l...
# ask-ai
f
what is the ideal stt+llm+tts setup which offers lowest latency. which llm to use, which tts to use.
👀 1
✅ 1
t
Thanks for reaching out, Rabbani. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’ll answer your question about the ideal low-latency STT → LLM → TTS stack. Quick summary (lowest end-to-end latency): • STT: Cartesia (Ink Whisper) for ultra-low latency (~80ms). Alternate: Google Cloud STT with 20ms frames if you need a proven streaming option. • LLM: GPT-3.5 Turbo for fastest responses in production; consider Claude or a locally hosted LLaMA variant if you can run it close to your infra. Aim for TTFT < 300ms. • TTS: Cartesia (Sonic 3) or Deepgram (Aura-2) for ~90–100ms TTS latency. Avoid high-quality offline models (e.g., Tortoise) that take seconds. Architecture & operational tips to minimize latency: 1. Use a fully streaming pipeline so stages overlap (STT streaming → partial prompts to LLM → streaming TTS). This makes end-to-end near the max stage latency instead of the sum. 2. Transport audio with WebRTC to keep network jitter <50ms. 3. Co-locate your agent with STT/LLM/TTS endpoints (same region / provider region) to cut round-trip time. 4. Limit LLM output length and prompt for short responses to reduce TTFT. 5. Measure EOU delay, LLM TTFT, and TTS TTFA; optimize the slowest stage first. Target numbers to aim for: • STT latency: ~80–250ms (Cartesia → Google Cloud → Deepgram range) • LLM TTFT: <300ms (use faster models or local inference) • TTS TTFA: <300ms • End-to-end target: ideally <800ms (sub-1s) If you want, tell me: • whether you prefer managed/cloud providers or running models locally, and • any constraints on cost, voice quality, or accuracy— and I’ll recommend a concrete provider combination and deployment pattern for your use case. Sources: Build Your First AI Voice Agent in Python: Complete Tutorial | LiveKit | Live conversations with AI using ChatGPT and WebRTC | LiveKit | Voice Agent Architecture: STT, LLM, and TTS Pipelines Explained | LiveKit | How can I reduce latency in voice agents using STT, TTS and LLM? | examples/bank-ivr | livekit/livekit_composite | DeepWiki, with interactive elements