Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Production Voice AI Agents with Python: Build, Test, Deploy
New

Production Voice AI Agents with Python: Build, Test, Deploy

Build an AI phone receptionist with LiveKit Agents, Pipecat and MCP: booking tools, tests, guardrails and fallback
Created byAdi Tejus
Last updated 11/2026
English
English

What you'll learn

  • Build a LiveKit Agents voice receptionist in Python with booking, FAQ and transfer tools
  • Measure voice latency per stage and fix the stage that matters most
  • Write prompts and text transforms that sound right when spoken
  • Enforce a read-back before booking, in the prompt and in code
  • Serve agent tools from an MCP server and hand calls off to specialist agents
  • Choose cascaded, realtime or hybrid voice architecture by cost and control
  • Test voice agents with offline tests, live tests, LLM judges and simulated callers
  • Add guardrails, provider fallback and cost tracking, then deploy with Docker or LiveKit Cloud

Coding Exercises

This course includes our updated coding exercises so you can practice your skills as you learn.

See a demo
Image of coding exercise example

Course content

9 sections • 18 lectures • 2h 15m total length
  • Build a voice AI receptionist that answers, books and hands off6:41

    Meet Riley, the AI receptionist for Maple Street Dental, in a full five-turn call: insurance, price, booking, a transfer request and goodbye, with every tool call printed. Plus one bug hidden in the call, which you will fix in section four.

  • Set up the project: 311 tests with no keys and no microphone7:26

    Install the course with uv, run 269 unit tests and 42 offline agent tests, see why console mode failed on a machine with no sound card and the real plugin bug we fixed, then the exact LiveKit Cloud steps you do yourself. Practical: a preflight check for your settings that never prints a secret.

  • Where 1.2 seconds go: the voice pipeline and its latency budget7:06

    Read a voice call as five numbers: end of turn, speech-to-text, the language model's first token, text-to-speech first byte and voice to voice. Practical: compare a call with an 800 ms budget and find that the biggest overspend is a setting, not a model.

  • Quick check: Meet Riley: setup and latency
  • Which stage is over the latency budget?
  • Run the safety net and find your slowest stage

Requirements

  • Basic Python: functions, classes, and async/await at a beginner level
  • A computer with Python 3.11 or newer and a terminal (Windows, macOS or Linux)
  • No paid account needed for the offline parts; live voice and phone calls use accounts you create yourself (LiveKit Cloud has a free plan; OpenAI is pay as you go)

Description

This course contains the use of artificial intelligence.

Build Riley, an AI phone receptionist for a fictional dental clinic, in Python with LiveKit Agents 1.8 and Pipecat 1.15. Riley answers questions from the clinic FAQ, checks a real calendar, reads every booking back before it books, hands billing questions to a specialist, transfers to a human, and keeps working when a model provider goes down.

This is a production course, not a demo. Every run on screen is real, recorded in a terminal in November 2026 with the versions pinned in the course files, and the failures stay in: a small local model that tells a caller she is booked when nothing was booked, a text-to-speech transform that swallowed a full stop, a handoff that lost the calendar, and how each one was fixed.

What you will do:

  • Run 311 tests with no API keys and no microphone, then talk to Riley in text with a scripted brain or a free local model (Ollama).
  • Measure where a voice call spends its time (end of turn, speech-to-text, the language model, text-to-speech) and find the setting that matters most.
  • Write prompts for the ear and a last-line-of-defence transform for text-to-speech.
  • Build booking tools with a read-back gate, serve tools from an MCP server, and hand off to specialists.
  • Choose cascaded, realtime or hybrid with written reasons and list-price per-minute estimates (prices checked 4 October 2026, in the course code).
  • Measure speech-to-text with word error rate and key-term misses.
  • Put the agent on a phone line (SIP), make transfers fail politely, and gate outbound reminder calls.
  • Test behaviour, not wording: offline agent tests, live tests, LLM judges, a rule-based judge and simulated callers.
  • Add guardrails for prompt injection, medical advice and private data, plus provider fallback and a chaos switch.
  • Rebuild the same agent in Pipecat, deploy with Docker or LiveKit Cloud, and sign off with an evidence check.

What you need: basic Python (functions, classes, async and await) and a terminal. Every offline part of the course runs for free without keys. Live voice and a phone number need a free LiveKit Cloud account; the real voice stack and live tests use your own Deepgram and Cartesia (free credit) and OpenAI (pay as you go, a few dollars for the whole course) keys. Each lecture shows the exact commands, and you sign up only when you are ready.

Every section ends with a practical in the course code, with tests that tell you when you got it right, plus a quiz and an assignment. The narration voice is AI generated.

LiveKit, Pipecat, OpenAI, Deepgram, Cartesia, Ollama and Qwen are trademarks of their respective owners. This course is independent and is not affiliated with or endorsed by any of them.

Who this course is for:

  • Python developers who want to build voice AI agents that work on real phone lines
  • Backend and AI engineers asked to ship a voice assistant for a business front desk
  • Developers who built a chatbot and want to make it a tested, production voice agent