Cloning my voice on my laptop - without a GPU 🎤🤖🔊
I recently fell down the voice-cloning rabbit hole. Every demo I found wanted a GPU, an account, or for me to upload a sample of my voice to someone else’s server. All three felt like a lot for what is essentially: here is a short clip, now make it say something else. I had a laptop with no GPU and a preference for keeping my audio local so I built voice-clone: a small fully-local app that takes 6-20 seconds of clean speech, lets you type whatever you want, and generates it in that voice. It is not a production service, but it runs, it stays local, and it is fast enough to be useful.
The model does the actual work
XTTS-v2 through coqui-tts handles the cloning. I didn’t train or fine-tune anything; XTTS is conditioned on the reference clip at inference time. That’s why a short sample works, and also why quality depends heavily on the sample you give it. The app trims silence, converts to mono 24 kHz, normalises the level, and checks for clipping or long silences before generating. It uses the first 15 seconds for conditioning and caches that across chunks. Text is split into sentence-aware chunks, synthesised, and stitched back together. Chunking matters more than I expected; a whole page at once gets wobbly and eats memory.

The CPU is a weird beast
My laptop has 4 physical cores and 8 logical threads. Like a normal person, I set the thread count to 8 and expected it to be faster. It was not. Eight threads was roughly 3.5× slower than four. The fix was to use physical cores and set torch’s inter-op threads to 1. Even then, CPU inference isn’t free. The model takes around 40 seconds to load and peaks at roughly 4.3 GB of RAM. Once warm, it runs at about 6-8× real-time on 4 cores. A 6-second sentence is roughly 40 seconds of synthesis plus the first load. Not instant, but fine if you keep the process alive.
Shipping it
XTTS-v2 is non-commercial under the Coqui Public Model License, so I don’t redistribute the weights. The app downloads them at runtime after you accept the licence and caches them in a Docker volume.
git clone https://github.com/atifali/voice-clone.git
cd voice-clone
docker compose up --build
Open http://127.0.0.1:7860, accept the CPML terms, and download the ~1.8 GB model once. After that it’s local and offline. There’s also a CLI, a saved voice library, reference analysis, progress reporting, and 24 tests. CI builds the Docker image, starts it, and checks that the UI actually responds which is more important than it sounds.
What it is and isn’t
It’s a local tool for experiments. No authentication, no hosting, and I wouldn’t expose the port to the internet. Requests are capped at 1,000 characters, quality depends on the reference clip, and the CPU won’t win any latency awards. The licence is a real constraint too: CPML is non-commercial, so this is for personal and research use unless you get a separate licence from Coqui. And only clone voices you own or have permission to use.
Potential next steps
GPU support is the obvious next step. After that: better reference cleanup, denoising, streaming output, and more stable long-form generation. A portable Linux bundle or small desktop app is on the list too, because Docker is great for people who already have it and a mild obstacle for everyone else. For now, I can give it a clip, type something ridiculous, and get it back in the same voice without sending anything to a server. That’s still a pretty good trick. The code is on github/atifali/voice-clone. If you try it, let me know how it goes especially if you find a better CPU threading setup or a cleaner way to package the torch stack.