Best for · AI tools
Build a custom voice AI engine with open source: the parts, the licences, the hardware
- Last checked
- 8 sources, linked below
- By the vectaai team
We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.
Verdict Our pick
The bar guide has a call.

- Pipecat if you want a Python framework with the most plug-ins; pick LiveKit Agents if you need WebRTC rooms and phone calls with self-hosted servers.
Compared here
- 01Pipecat
- 02LiveKit Agents
- 03Whisper
- 04faster-whisper
- 05Ollama
- 06Kokoro
- 07Piper
- 08Coqui TTS (XTTS)
Short answer
A custom voice AI engine is four open source parts in a row: something that listens (speech to text), something that thinks (a language model), something that speaks (text to speech), and an orchestrator that passes audio between them fast enough to feel like a conversation. A solid all-open stack today: Pipecat (BSD-2) or LiveKit Agents (Apache 2.0) to orchestrate, faster-whisper (MIT) to listen, Ollama (MIT) to run a local model, and Kokoro (Apache 2.0, 82 million parameters) or Piper (GPL-3.0) to speak.
Pick Pipecat if you want a Python framework with the most plug-ins; pick LiveKit Agents if you need WebRTC rooms and phone calls with self-hosted servers. For a voice that sounds like you, Piper can be trained on new voices, and Coqui's XTTS clones from a short sample, but check the model licence before commercial use. Below: each layer, what hardware each part wants, licence traps, and when a hosted API is the cheaper honest answer.
Sponsored links. We may earn a commission; it never changes the pick.
At a glance
| Layer | Project | Licence (as listed) | What it does | Hardware note (as stated) |
|---|---|---|---|---|
| Orchestrator | Pipecat | BSD-2-Clause | Python framework for real-time voice agents; 40+ TTS, 30+ LLM and 20+ STT plug-ins | Python 3.11 to 3.14 |
| Orchestrator | LiveKit Agents | Apache 2.0 (turn detection models under LiveKit Model License) | Server-side voice agents in WebRTC rooms, phone calls via SIP, turn detection | Self-host the LiveKit server or use LiveKit Cloud |
| Speech to text | Whisper | MIT (code and weights) | Multilingual recognition, tiny to large plus turbo | About 1 GB VRAM (tiny) to 10 GB (large); turbo about 6 GB |
| Speech to text | faster-whisper | MIT | Whisper reimplementation, up to 4x faster, less memory | CPU or GPU; CUDA 12 and cuDNN 9 for GPU |
| Language model | Ollama | MIT | Runs open models locally with a REST API on port 11434 | Mac, Windows, Linux, Docker |
| Text to speech | Kokoro-82M | Apache 2.0 | Small, fast TTS; 8 languages, 54 voices in v1.0 | 82M parameters |
| Text to speech | Piper | GPL-3.0 | Fast local TTS; guide for training new voices | Install with pip install piper-tts |
| Voice cloning | Coqui TTS (XTTS v2) | Repo MPL-2.0; model licence not stated on the page | Clones a voice from a reference recording, 16 languages | Check the model licence |
Money first. Almost everything on this page is free and open source, so nobody pays us for it. The one affiliate link is to ElevenLabs, a hosted voice service, for readers who decide building their own is not worth the weekend. It sits last for a reason.
Second, we did not build and benchmark a voice agent for this page. Every licence, model size and speed claim below is quoted from the project's own GitHub or Hugging Face page, read on 3 December 2026. Speed figures are the projects' own; your hardware will differ.
What "voice AI engine" means
People use the phrase for two different things:
- A voice agent: you talk, it listens, thinks and answers out loud, like a phone assistant.
- A custom voice: a text to speech engine that sounds like a specific person or brand.
Most builders want the first, with a bit of the second. So this page covers the full agent pipeline, then how to give it a custom voice. If you only want speech generation on your PC, our local AI voice generator guide is the shorter read.
The pipeline in one picture
Mic, then speech to text, then language model, then text to speech, then speaker. And around all of it, an orchestrator that streams audio in small chunks, detects when the caller has stopped talking, lets them interrupt, and keeps latency low.
Each box is swappable. That is the whole point of building your own: you can run every box on your hardware, or mix local and hosted pieces as cost and quality demand.
Layer 1: the orchestrator
This is the part people forget, and it is the part that decides whether your engine feels like a conversation or a walkie-talkie.
Pipecat
Pipecat describes itself as an open source Python framework for real-time voice and multimodal agents. Licence: BSD-2-Clause, very permissive. It runs on Python 3.11 to 3.14. What makes it the default choice is the plug-in list: over two dozen speech to text providers (Whisper among them), over thirty language model providers (including Ollama), and over forty text to speech providers (including Kokoro, Piper and XTTS), next to hosted ones like Deepgram, ElevenLabs and OpenAI.
Transports cover WebRTC through Daily, LiveKit and its own small WebRTC transport, WebSockets, WhatsApp and local audio, with telephony serialisers for Twilio, Telnyx, Plivo, Vonage, Exotel and Genesys. Install with pip install pipecat-ai. A hosted Pipecat Cloud exists if you later want someone else to run the processes.
LiveKit Agents
LiveKit Agents builds agents that join LiveKit rooms as participants and run on servers. The framework is Apache 2.0; its turn detection models use a separate LiveKit Model License, so read that one. Features listed: mixing speech to text, language model, text to speech and realtime APIs; a transformer-based turn detection model that judges when the user has finished speaking; phone calls in and out through LiveKit's telephony stack; MCP support and a test framework.
The big plus for a "build it yourself" engine: LiveKit says the whole stack is open source, including the LiveKit server, so you can self-host everything. Agents connect through three environment variables: LIVEKIT_URL, LIVEKIT_API_KEY and LIVEKIT_API_SECRET.
Which one? Pipecat if you want the most plug-ins and plain Python control. LiveKit Agents if callers arrive through WebRTC apps or phone lines and you want rooms, SIP and turn detection from one project.
Layer 2: speech to text
Whisper
OpenAI's Whisper is MIT licensed, code and weights both. The model sizes, per its README, with video memory and speed relative to the large model on an A100:
| Model | Parameters | VRAM | Relative speed |
|---|---|---|---|
| tiny | 39M | about 1 GB | about 10x |
| base | 74M | about 1 GB | about 7x |
| small | 244M | about 2 GB | about 4x |
| medium | 769M | about 5 GB | about 2x |
| large | 1,550M | about 10 GB | 1x |
| turbo | 809M | about 6 GB | about 8x |
Turbo is an optimised large-v3 with a small accuracy drop, multilingual, and not trained for translation. For a voice agent, small or turbo is the usual sweet spot.
faster-whisper
faster-whisper reimplements Whisper and claims to be "up to 4 times faster" for the same accuracy with less memory, with 8-bit quantisation on CPU and GPU. Its own benchmark on 13 minutes of audio with the large-v2 model on an RTX 3070 Ti: 2 minutes 23 seconds for openai/whisper against 1 minute 3 seconds for faster-whisper in fp16, and 59 seconds in int8 using 2.9 GB of video memory. On a CPU (Core i7-12700K) with the small model: 6 minutes 58 seconds against 1 minute 42 seconds in int8. MIT licensed. GPU use needs CUDA 12 and cuDNN 9.
For a real-time agent, use faster-whisper. The speed gap is the difference between a natural pause and an awkward one.
Layer 3: the brain
Ollama runs open language models locally and exposes a REST API at localhost port 11434, with Python and JavaScript libraries. MIT licensed, on Mac, Windows, Linux and Docker. Its README's example model is Gemma 4, and it names families such as Qwen, DeepSeek, gpt-oss, GLM, Kimi and MiniMax.
The README does not give memory needs per model size, so we will not invent them. The practical rule: a voice agent needs a fast answer more than a brilliant one. Pick the smallest model that handles your use case, because every extra second of thinking is a second of silence on the line. Pipecat lists Ollama as a supported language model service.
Layer 4: text to speech
Kokoro
Kokoro is an open-weight model with only 82 million parameters, Apache 2.0 licensed. Version 1.0 (27 January 2025) speaks 8 languages with 54 voices. The model card says it delivers "comparable quality to larger models" while being faster and cheaper, and puts hosted market rates at under $1 per million characters as of April 2025. It was trained on a few hundred hours of permissive audio, and the card says it excludes custom voice clones from training. Small, fast and permissively licensed: the default pick for a local agent.
Piper
Piper is "a fast and local neural text-to-speech engine". The current repository is GPL-3.0, which matters if you ship it inside a closed product; talk to someone who knows licences. Install with pip install piper-tts. It links a guide for training new voices, which makes it the open route to a truly custom voice.
Coqui TTS and XTTS v2
Coqui's TTS toolkit (repository under MPL-2.0) includes XTTS v2, which its README says supports 16 languages, and shows a cloning example that takes a reference recording of the target voice. The repo page does not state the XTTS model's own licence, and model licences can differ from code licences. Read the model's licence before you sell anything made with it.
Giving it a custom voice
Three options, from easiest to hardest:
- Pick a stock voice. Kokoro's 54 voices may be enough for a product voice. Zero training, zero consent questions.
- Clone from a sample. XTTS v2 takes a reference recording. Quick to try; quality depends on a clean recording. Licence check required.
- Train a voice. Piper's training guide lets you build a new voice from your own recordings. Most work, best control, and you own the result.
Whichever you choose, clone only voices you have clear, written permission to use. Our custom AI voice generator and AI voice training pages cover consent and recording quality in more depth.
A first build, in an afternoon
- Install Ollama and pull a small model. Check it answers through the API.
- Install Pipecat with pip.
- Wire faster-whisper (small model) in, Ollama as the brain, Kokoro as the voice, using local audio transport.
- Talk to it. Measure the gap between you stopping and it starting. That gap is your main enemy.
- Shrink the gap: smaller language model, int8 Whisper, shorter system prompt, streaming text to speech.
- Only then add a phone line or a WebRTC front end.
Licence traps, in plain words
- BSD, MIT, Apache 2.0 (Pipecat, Whisper, faster-whisper, Ollama, Kokoro, LiveKit Agents): permissive. Keep the notices and you can ship commercially.
- GPL-3.0 (Piper): if you distribute software that includes it, GPL obligations apply. Running it on your own server is a different case from shipping it inside an app.
- Separate model licences (LiveKit turn detection, XTTS): the code licence on the repo badge does not cover the model weights. Read both.
- The language model you pull in Ollama has its own licence too.
When hosted is the honest answer
Building your own wins on privacy, control and cost at volume. It loses on setup time, babysitting servers and, often, voice quality at the very top end. If you need a polished agent next week for a handful of calls a day, a hosted platform is cheaper than your time. Our enterprise voice AI page compares hosted agent platforms, and on premise voice AI covers commercial products that run on your servers. For hosted voices alone, ElevenLabs is the well-known option.
Our verdict
The open source parts are good enough today to build a real voice engine: Pipecat or LiveKit Agents to run the conversation, faster-whisper to listen, Ollama to think, Kokoro to speak. Start local and small, fight latency before features, and read every model licence before you charge money for the result. More voice and AI tools are in the AI tools hub.
Questions people ask
How do I build my own voice AI engine with open source?
Chain four parts: speech to text such as Whisper or faster-whisper, a language model served locally by Ollama, text to speech such as Kokoro or Piper, and an orchestrator like Pipecat or LiveKit Agents that streams audio between them and handles interruptions. Start with all four on one machine, then split them onto servers when you need scale.
What is the best open source text to speech for a voice agent?
Kokoro is the popular pick: 82 million parameters, Apache 2.0 weights, 8 languages and 54 voices in version 1.0, and described by its makers as significantly faster than larger models. Piper is the lightweight alternative under GPL-3.0, with a guide for training your own voices. XTTS v2 from Coqui clones a voice from a sample; check its model licence first.
Can I clone a custom voice with open source tools?
Yes, two ways. Coqui's XTTS v2 clones from a reference recording you pass in, and Piper documents how to train a new voice on your own recordings. Cloning someone else's voice needs their clear consent, and some model licences restrict commercial use, so read the licence file, not just the repo badge.
What hardware do I need to run a voice AI engine locally?
Less than you think for the voice parts. Whisper's small model needs about 2 GB of video memory and turbo about 6 GB; faster-whisper also runs on CPU. Kokoro has only 82 million parameters. The language model is the hungry part; its needs depend on which model you pull in Ollama, which the Ollama page does not size.
Is Pipecat or LiveKit Agents better?
Pipecat is a Python framework with the widest plug-in list and many transports, including WebRTC, WebSocket and telephony providers like Twilio. LiveKit Agents runs agents as participants in LiveKit rooms, with its own turn detection model, SIP calling and a fully self-hostable server. Both are open source; pick on how callers will reach you.
Sources
Every fact above comes from these pages. Prices change, so each one carries the date we read it.
- Pipecat on GitHub, checked 3 Dec 2026
- LiveKit Agents on GitHub, checked 3 Dec 2026
- OpenAI Whisper on GitHub, checked 3 Dec 2026
- faster-whisper on GitHub, checked 3 Dec 2026
- Ollama on GitHub, checked 3 Dec 2026
- Kokoro-82M on Hugging Face, checked 3 Dec 2026
- Piper (piper1-gpl) on GitHub, checked 3 Dec 2026
- Coqui TTS on GitHub, checked 3 Dec 2026