Run everything locally — no cloud, no API keys, no data leaving your machine. But before diving into the tools, it helps to understand the different approaches to voice cloning and how they've evolved — each requires different amounts of data, compute, and effort.
AI voice cloning has evolved rapidly. Understanding the three main approaches — and how much data each one needs — is key to understanding both the technology and the threat landscape.
# One-shot cloning with Spark TTS # Requires both the audio AND its exact transcription spark-tts --text "My fellow Americans." --device 0 \ --save_dir ~/callcentervillage/voice-cloning \ --prompt_speech_path /opt/spark-tts/pretrained_models/potus/reference.wav \ --prompt_text "$(cat /opt/spark-tts/pretrained_models/potus/reference.txt)" # Spark TTS will output the save path, e.g.: # Audio saved at: ~/callcentervillage/voice-cloning/<YYYYMMDDHHMMSS>.wav # Play it back with: # play ~/callcentervillage/voice-cloning/<YYYYMMDDHHMMSS>.wav # If the text doesn't match the audio exactly, quality suffers
# Zero-shot cloning with Coqui XTTS v2 # Just provide audio — no transcript, no training cd ~/callcentervillage/voice-cloning coqui-tts --model_name tts_models/multilingual/multi-dataset/xtts_v2 \ --speaker_wav /opt/coqui-tts/celebrity-voice.wav \ --language_idx en \ --text "I'm entering my cloned era." \ --out_path output.wav && play output.wav
Source audio: YouTube
Hands-on tools for voice cloning, conversion, and synthesis — all running locally on your machine.
# Preinstalled on Call Center Village laptops # Wrapper at /usr/local/bin/coqui-tts → /opt/coqui-tts/.venv/bin/tts cd ~/callcentervillage/voice-cloning coqui-tts --model_name tts_models/multilingual/multi-dataset/xtts_v2 \ --speaker_wav input.wav --language_idx en \ --text "Somebody once told me, the world is gonna roll me." \ --out_path output.wav && play output.wav
Voice cloning doesn't happen in isolation — you need to understand what was said before you can generate a convincing response. A speech-to-text tool like whisper.cpp lets you transcribe recordings, voicemails, or intercepted audio into text you can work with. A local LLM like llama.cpp takes that transcript and generates contextually appropriate responses — matching tone, vocabulary, and conversation flow — that you can then feed into a TTS or voice conversion tool.
Together, these tools close the loop: listen, understand, respond, and speak — all running locally with zero cloud dependency and no API logs. The Call Center Village laptops use whisper.cpp and llama.cpp directly, but there are user-friendly alternatives worth knowing about — Ollama, LM Studio, Open WebUI, LibreChat, Jan all make it easier to run local models with polished UIs.
See Appendix → Additional Resources for details on each.
Local speech-to-text — transcribe audio to text entirely on your machine.
Powered by OpenAI's Whisper model, compiled to run efficiently on CPU. Transcribe audio files, extract text from recordings for re-synthesis, or analyze call recordings — all offline.
cd ~/callcentervillage/voice-cloning # Transcribe an audio file (using the tiny model for speed on i3) /opt/whisper.cpp/build/bin/whisper-cli \ -m /opt/whisper.cpp/models/ggml-tiny.en.bin \ -f input.wav # Transcribe with timestamps /opt/whisper.cpp/build/bin/whisper-cli \ -m /opt/whisper.cpp/models/ggml-tiny.en.bin \ -f input.wav -otxt # Output as SRT subtitles /opt/whisper.cpp/build/bin/whisper-cli \ -m /opt/whisper.cpp/models/ggml-tiny.en.bin \ -f input.wav -osrt # Use the small model for better accuracy (slower) /opt/whisper.cpp/build/bin/whisper-cli \ -m /opt/whisper.cpp/models/ggml-small.en.bin \ -f input.wav
The tiny model is fastest and works well on low-powered hardware. Use small for better accuracy if you can wait a bit longer. Models ending in .en are English-only and slightly more accurate for English.
| Model | Size | Memory | Speed | Accuracy |
|---|---|---|---|---|
| tiny / tiny.en | 75 MB | ~390 MB | ||
| base / base.en | 142 MB | ~500 MB | ||
| small / small.en | 466 MB | ~1.0 GB | ||
| medium / medium.en | 1.5 GB | ~2.6 GB | ||
| large-v3 | 3.1 GB | ~4.7 GB |
For these laptops, tiny or base are recommended. See all available models at huggingface.co/ggerganov/whisper.cpp.
Run large language models locally — generate scripts and dialogue without the cloud.
Generate realistic call scripts, social engineering dialogue, or conversational responses — all without sending data to the cloud. Perfect for generating text that a cloned voice can speak.
cd ~/callcentervillage/voice-cloning # Generate a simple response (using a small quantized model for i3) /opt/llama.cpp/build/bin/llama-cli \ -m /opt/llama.cpp/models/tinyllama-1.1b-chat.Q4_K_M.gguf \ -p "Write a short phone script where a bank employee asks a customer to verify their identity." \ -n 150 # Interactive chat mode /opt/llama.cpp/build/bin/llama-cli \ -m /opt/llama.cpp/models/tinyllama-1.1b-chat.Q4_K_M.gguf \ --interactive \ -p "You are a call center agent. Respond naturally to the customer." # Generate text and save to file (for feeding into TTS) /opt/llama.cpp/build/bin/llama-cli \ -m /opt/llama.cpp/models/tinyllama-1.1b-chat.Q4_K_M.gguf \ -p "Write a convincing voicemail message from a bank about suspicious activity." \ -n 100 > script.txt
Smaller quantized models (Q4_K_M) run best on limited hardware. The output won't match GPT-4, but it's enough to generate realistic scripts entirely offline.
These tools chain together to build fully local voice cloning pipelines — no internet connection required. Here are two realistic scenarios:
You have a voice sample of someone. Generate a script and make it sound like they said it.
cd ~/callcentervillage/voice-cloning # 1. Record or obtain a voice sample of the target # (You can also use Audacity to record) rec -r 44100 -c 1 target_voice.wav trim 0 20 # 2. Generate a script with llama.cpp /opt/llama.cpp/build/bin/llama-cli \ -m /opt/llama.cpp/models/tinyllama-1.1b-chat.Q4_K_M.gguf \ -p "Write a short voicemail about a package delivery." \ -n 80 > script.txt # 3. Clone the voice with the generated script tts --model_name tts_models/multilingual/multi-dataset/xtts_v2 \ --speaker_wav target_voice.wav \ --language_idx en \ --text "$(cat script.txt)" \ --out_path cloned_output.wav
You have a recording of a conversation. Transcribe it, generate a contextual follow-up, and deliver it in the original speaker's voice.
cd ~/callcentervillage/voice-cloning # 1. Transcribe the recording to understand what was said /opt/whisper.cpp/build/bin/whisper-cli \ -m /opt/whisper.cpp/models/ggml-tiny.en.bin \ -f recorded_call.wav \ -otxt # 2. Feed the transcription to llama.cpp for a contextual response /opt/llama.cpp/build/bin/llama-cli \ -m /opt/llama.cpp/models/tinyllama-1.1b-chat.Q4_K_M.gguf \ -p "The caller said: $(cat recorded_call.wav.txt). Write a convincing follow-up response as if you are the same person calling back." \ -n 100 > response.txt # 3. Synthesize the response in the original speaker's voice tts --model_name tts_models/multilingual/multi-dataset/xtts_v2 \ --speaker_wav recorded_call.wav \ --language_idx en \ --text "$(cat response.txt)" \ --out_path cloned_response.wav