Skip to content

Add fully local voice agent example (examples/voice_agents/local_only)#6525

Open
thefullnacho wants to merge 2 commits into
livekit:mainfrom
thefullnacho:local-only-example
Open

Add fully local voice agent example (examples/voice_agents/local_only)#6525
thefullnacho wants to merge 2 commits into
livekit:mainfrom
thefullnacho:local-only-example

Conversation

@thefullnacho

Copy link
Copy Markdown

Proposed in #6522. A voice agent where every stage runs on your own hardware, zero cloud calls:

  • STT: openai plugin → speaches (faster-whisper) via local OpenAI-compatible endpoint
  • LLM: openai.LLM.with_ollama() → Ollama
  • TTS: openai plugin → kokoro-fastapi, same pattern
  • VAD + turn detection: silero + turn-detector (both already local)

Includes bench.py, a per-stage latency benchmark, and a README with measured numbers (RTX 5080 + RTX 4060 Ti, warm path, medians of 5): TTS first byte 36ms, STT 359ms for a ~3s utterance, LLM TTFT 127ms at 170 tok/s. Roughly 520ms from end of speech to first agent audio, from consumer hardware.

The README also documents the failure modes I hit building it, because the next person will hit them too: thinking models stall the voice path (qwen3 streamed its first content token at 18s, and none of Ollama's switches fix it cleanly), prebuilt GPU images without sm_120 kernels, and cold-start vs warm-path benchmarking.

One open question from the issue stands: the turn-detector plugin is deprecated in favor of inference.TurnDetector, which routes through the inference gateway. This example uses the plugin with a comment explaining why, happy to update when there's a local-capable replacement.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qoh9oPdHqMXMt58gAwxhgK

@CLAassistant

CLAassistant commented Jul 23, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Composes existing pieces into a zero-cloud voice pipeline: speaches
(faster-whisper) STT and kokoro-fastapi TTS via the openai plugin's
base_url, Ollama LLM via with_ollama(), silero VAD, and local turn
detection. Includes a per-stage latency benchmark and a README with
measured numbers on consumer hardware.

See livekit#6522 for the proposal discussion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qoh9oPdHqMXMt58gAwxhgK
devin-ai-integration[bot]

This comment was marked as resolved.

The setup step still said qwen3:4b from before the default switched to
llama3.2:3b. A user following the quickstart verbatim would pull the
model the failure-modes section warns against, then hit model-not-found.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qoh9oPdHqMXMt58gAwxhgK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants