๐งฌ XTTS Voice Cloning Locally: Clone Any Voice, Fully Offline
XTTS clones a voice from a 6-second sample on your own GPU, fully offline. The correct 2026 install, real VRAM numbers, and where long-form narration quality actually breaks down.
Derek Holt ยท Local AI & Hardware Writer
ยท 4 min read

XTTS clones a voice from about six seconds of reference audio, fully offline, and here's the thing most guides bury near the bottom: the output is licensed non-commercial only, because the company that made it doesn't exist anymore to sell anyone a different license. That's not a reason to skip it. It's a reason to know exactly what's being installed before building anything on top of it.
I run XTTS on my RTX 4080 for personal projects, mainly cloning my own voice for scratch narration before a real take. Genuinely good at that. I wouldn't put a client's paid product on top of it without reading the license twice, and neither should anyone else.
By the numbers
- Clones a voice from roughly 6 seconds of reference audio; 15-30 seconds recommended for a cleaner, more stable result
- Supports 17 languages, including English, Spanish, Hindi, Japanese, and Arabic (coqui/XTTS-v2)
- Model weights ship under the Coqui Public Model License (CPML) 1.0.0, non-commercial only; the TTS library's code is separately licensed MPL 2.0 and is fine for commercial use on its own
- Coqui Inc, the company behind the original project, shut down in January 2024. There's currently nobody positioned to sell a commercial weights license
- Generation runs on roughly 2GB of VRAM at FP16; 4-6GB is the realistic comfort zone for stutter-free real-time output
- GPU-accelerated inference lands around a 0.3x real-time factor, about 3x faster than the audio it produces
- English text hard-splits around 250-300 characters per generation call โ feed it a full paragraph unsplit and it either truncates or errors
The license catch nobody leads with
CPML only covers the trained model weights, not the code. The Python library itself (the thing doing the actual work of loading the model and running inference) is MPL 2.0, a genuinely permissive license fine for commercial products. The weights are the problem: CPML restricts commercial use of the model and its audio output, and with Coqui Inc closed since January 2024, there is no seller left to grant an exception. Treat XTTS as personal-use and prototype tooling unless a lawyer signs off on something specific to a use case โ not because the model is bad, but because nobody's left to ask.
Installing it correctly in 2026
The instruction still floating around most tutorials, pip install TTS, installs the original abandoned package. It pins old dependency versions and breaks on a current Python and PyTorch install. The actual maintained path in 2026 is the idiap community fork:
pip install coqui-tts
The import statement doesn't change even though the package name did:
from TTS.api import TTS
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=True)
Small detail, saves an afternoon of dependency debugging that has nothing to do with voice cloning and everything to do with a stale pip package. First run also pulls several gigabytes of model weights from Hugging Face automatically, so the first tts.tts_to_file() call is the slow one; every call after that is just inference.
Cloning a voice
tts.tts_to_file(
text="This is a cloned voice speaking.",
speaker_wav="sample.wav",
language="en",
file_path="output.wav",
)
sample.wav is the entire trick: 15-30 seconds, one speaker, clean audio with no music or background chatter underneath. A noisy sample clones the noise right along with the voice.
Running that same clone repeatedly gets wasteful if the sample gets reprocessed on every call. Coqui's API supports caching a computed speaker embedding under a custom ID, so a voice gets fingerprinted once and reused after that instead of re-analyzing the reference clip every time โ worth doing the moment a project needs more than one throwaway line.
What it actually needs in VRAM
Bare generation fits in about 2GB, which is almost nothing by 2026 standards. Real-time output without stuttering wants more headroom, 4-6GB realistically, and anything from a GTX 1660 up handles it without complaint. My 4080's 16GB means XTTS runs alongside faster-whisper and a small Ollama model at the same time without any of them fighting for memory โ see the GPU guide if that VRAM math needs spelling out for a specific card.
Where the quality falls apart
Short lines clone beautifully. Long-form narration is where XTTS shows its seams. The model hard-splits around 250-300 characters per call, so anything past a sentence or two needs to be chunked before it ever reaches the model. Across those chunks, pronunciation and voice timbre can drift, and long or run-on sentences occasionally stutter or repeat a word before recovering.
None of that is a rare bug report. It's a known behavior with known workarounds: a fixed random seed, larger chunk sizes so there are fewer boundaries for the voice to drift across, tuned sampling (repetition penalty around 3-5, temperature around 0.6-0.8), and a short silence gap inserted between chunks so an audiobook-style read doesn't sound stitched. Do all of that and a 20-minute narration holds together. Skip it and the seams show by minute three.
XTTS vs the alternatives
XTTS is one voice option inside the wider local voice stack, and it's the right piece specifically when the job is cloning one identifiable voice from a sample. For everything else, it's the wrong tool for the job description. The three-way comparison against Kokoro and Chatterbox runs identical script through all three so the differences are audible instead of theoretical, and if cloning was never actually the requirement, Kokoro is faster to set up and lighter to run.
Six seconds of clean audio and a GPU that isn't ancient is the whole technical barrier to entry now, which is a strange thing to be able to say about voice cloning in 2026. The license, not the technology, is the part actually worth reading twice.
Frequently asked questions
โธIs XTTS free to use commercially?
The code is MPL 2.0 and fine for commercial use. The trained weights ship under the Coqui Public Model License (CPML), non-commercial only. Coqui Inc, the company that could sell a commercial license, shut down in January 2024, so there's currently no legitimate path to a paid commercial license at any price.
โธHow much voice sample do I need to clone someone?
About 6 seconds is the technical minimum. 15-30 seconds of clean, single-speaker audio with minimal background noise gives a noticeably more stable clone.
โธHow much VRAM does XTTS need?
Around 2GB at FP16 for bare generation. In practice, 4-6GB is the comfort zone for real-time output without stutter, which any card from a GTX 1660 up handles.
โธDoes XTTS work well for long narration like audiobooks?
Not without help. It hard-splits around 250-300 characters per generation call, and voice timbre can drift across chunks in longer text. Fixed seeds, larger chunks, and tuned sampling settings reduce it, but it's a real limitation, not a rare edge case.
The 5 best AI video finds, every week
New models, tested prompts, and what actually worked in our production โ one short email a week. No spam, unsubscribe anytime.
Written by Derek Holt
Local AI & Hardware Writer
Runs the site's local-inference rig and benchmarks every GPU, quant, and speed-stack claim on it personally before it goes in a guide. Will not shut up about VRAM bandwidth.
Keep learning
GuidesLocal Voice AI: Whisper, TTS & Offline Assistants (2026)
The complete map of the self-hosted voice stack: Whisper and faster-whisper for speech-to-text, Kokoro/Piper/Chatterbox/XTTS for voices, Ollama for the brain, and how they wire together offline.
2026-07-27
ComparisonsKokoro vs Chatterbox vs XTTS: Best Local TTS in 2026
A same-question comparison of the three local voice models that actually matter: what each one clones, what license lets you ship, and which one your hardware can even run.
2026-07-27
GuidesKokoro TTS Locally: The 82M-Parameter Voice Model Setup
Why a tiny Apache-2.0 model with no voice cloning is still the narration tool I install first, plus the actual pip-install-to-first-spoken-line steps.
2026-07-27
GuidesBest GPU for Local AI in 2026: A VRAM-First Guide
The GPU guide written from a rig that renders AI daily: why VRAM beats speed, what each budget tier really runs, and the used cards that embarrass new ones.
2026-07-10