# How to Build a Voice AI Agent

DevFeed: [How to Build a Voice AI Agent](<https://devfeed.tech/articles/how-to-build-a-voice-ai-agent-129101.md>)

Original publisher: [Read original article](<https://openrouter.ai/blog/tutorials/build-voice-ai-agent/>)

Author: OpenRouter

Published: 2026-11-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [OpenRouter](<https://devfeed.tech/sources/openrouter.md>)

Topics: [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [Conversational AI](<https://devfeed.tech/topics/conversational-ai.md>), [function calling](<https://devfeed.tech/topics/function-calling.md>), [livekit](<https://devfeed.tech/topics/livekit.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [build](<https://devfeed.tech/tags/build.md>), [call](<https://devfeed.tech/tags/call.md>), [generate](<https://devfeed.tech/tags/generate.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [tools](<https://devfeed.tech/tags/tools.md>), [voice](<https://devfeed.tech/tags/voice.md>), [voice-ai](<https://devfeed.tech/tags/voice-ai.md>)

## AI overview

The tutorial builds a Python restaurant booking voice agent using OpenRouter for transcription (ElevenLabs Scribe v2), tool-calling and replies (GPT-6 Luna), and speech generation (ElevenLabs Flash v2.5). It transcribes callers, checks availability and books through mock tools, then streams completed reply sentences to TTS; LiveKit Agents adds live audio, voice activity detection, playback, and interruption handling. In tests, server-side time to first audio had a 1.9-second median overall (1.4 seconds without tools, 2.4 with tools), excluding network and playback delays; the example's extra LLM requests can make it slower. TTS made up about 90% of measured model cost. Scribe v2 was chosen for its accuracy-speed balance, though recognizers often miss uncommon names, so callers should confirm key details. The tutorial stresses replacing mock tools with a backend that verifies successful actions, testing with representative speech, and measuring end-to-end latency. Separate speech-to-speech tests confirmed tool selection but did not measure full conversation speed or quality.

## Source excerpt

A voice agent needs to do more than generate a good answer. It must understand what someone said, decide what to do, call any needed tools, and start speaking again before the pause gets awkward.