By the end of this post you will have a local text-to-speech server reading your video scripts, in English or Spanish, and you will know which voices to avoid. It runs in Docker; a GPU makes it fast, but the engine we recommend also ships a CPU image.
We measured three engines on the same script, because the first version of this post mixed up an English voice with Spanish text. That mistake is now a column in the table.
What you need
- Docker, and an NVIDIA GPU if you want the speeds below (a CPU image exists; we did not time it)
- A script as plain text, one paragraph per scene
ffmpegto convert or join the files- 20 minutes
Step 1: start Kokoro
Kokoro-FastAPI wraps the Kokoro model in an OpenAI-compatible API on port 8880:
# with an NVIDIA GPU
docker run -d --gpus all -p 8880:8880 --name kokoro ghcr.io/remsky/kokoro-fastapi-gpu:latest
# CPU only
docker run -d -p 8880:8880 --name kokoro ghcr.io/remsky/kokoro-fastapi-cpu:latestList the voices. The first letter is the language, the second the gender: a American English, b British English, e Spanish.
curl -s localhost:8880/v1/audio/voices | python3 -m json.tool | grep '"id"' | head -60The Spanish voices are ef_dora, em_alex and em_santa.
Step 2: generate your first voiceover
curl -s localhost:8880/v1/audio/speech -H 'Content-Type: application/json' \
-d '{"model":"kokoro","voice":"af_heart","input":"Welcome back to the channel.","response_format":"wav"}' \
-o intro.wavFor Spanish, pick a Spanish voice and set the language code, so the text is pronounced with Spanish rules:
curl -s localhost:8880/v1/audio/speech -H 'Content-Type: application/json' \
-d '{"model":"kokoro","voice":"em_alex","lang_code":"e","input":"Bienvenido de nuevo al canal.","response_format":"wav"}' \
-o intro-es.wavIf the output sounds like an English speaker reading Spanish, the voice or the lang_code is wrong.
Step 3: one file per scene, then join them
import pathlib, requests
paragraphs = pathlib.Path("script.txt").read_text(encoding="utf-8").split("\n\n")
for i, text in enumerate(paragraphs, 1):
r = requests.post("http://localhost:8880/v1/audio/speech", json={
"model": "kokoro", "voice": "em_alex", "lang_code": "e",
"input": text, "response_format": "wav"}, timeout=300)
r.raise_for_status()
pathlib.Path(f"scene-{i:02d}.wav").write_bytes(r.content)One file per scene means a correction re-renders one paragraph, not the whole video. Join them for a quick listen, or drop the scene files straight into your editor:
for f in scene-*.wav; do echo "file '$f'"; done > list.txt
ffmpeg -f concat -safe 0 -i list.txt -c copy voiceover.wavWhat we measured
On 2026-10-08 we ran scripts/bench/tts_voices.py on our DGX Spark (GB10, 128 GB unified memory). It sends the same script, 160 words in English and 159 in Spanish, to each engine and voice: one warm-up request, then two timed ones. It records wall time, audio length from the WAV header and the real-time factor (RTF: seconds of audio per second of work). Then Whisper medium (Speaches, language forced) transcribes each file, and we compute the word error rate (WER) against the script. Raw results: tts-voices-2026-10-08.json.
| Engine, model (where it ran) | Voices | Script | RTF | Wall time | WER |
|---|---|---|---|---|---|
| Kokoro (GPU) | af_heart, am_michael, bf_emma | English | 33.8 to 34.9 | 1.5 to 1.7 s | 0% |
| Kokoro (GPU) | ef_dora, em_alex, em_santa | Spanish | 35.6 to 35.7 | 1.4 s | 0.6% to 1.9% |
| Kokoro (GPU) | af_heart (English voice) | Spanish | 35.9 | 1.9 s | 11.3% |
openedai-speech tts-1, Piper (CPU) | alloy, echo, fable, onyx, nova, shimmer | English | 11.3 to 14.2 | 2.8 to 3.4 s | 0% to 4.4% |
openedai-speech tts-1, Piper (CPU) | same six | Spanish | 12.6 to 14.8 | 3.3 to 4.2 s | 18.2% to 31.4% |
openedai-speech tts-1-hd, XTTS v2 (CPU) | alloy, nova | English | 0.19 to 0.20 | 317 s | 0% |
openedai-speech tts-1-hd, XTTS v2 (CPU) | alloy, nova | Spanish | 0.21 | 319 to 338 s | 1.3% |
The audio ran 36 to 69 seconds depending on the voice. WAV files came out at 1.6 to 3.3 MB.
What the numbers mean in practice:
- Spanish that works: Kokoro’s
ef_dora,em_alexandem_santa, and XTTS v2. Whisper transcribed them with one to three slips in 159 words. - Spanish that does not: all six Piper voices behind openedai-speech’s
tts-1. They are English models (en_US-libritts_r,en_GB-northern_english_male). Whisper heard “arquivo” for archivo and “paráforo” for párrafo. Kokoro’s English voice on Spanish text was better but still wrong one word in nine. - XTTS v2 is good and slow here. Our openedai-speech container has no GPU, so XTTS ran on the CPU at a fifth of real time: about five minutes per minute of audio. The first
tts-1-hdrequest also downloaded the XTTS v2 model, 1.8 GB on disk, and the container keeps it loaded afterwards: checkdocker statsand restart the container if you need the memory back.
What the spec sheet won’t tell you
WER says whether a speech recogniser understood the voice. It does not say whether the voice sounds warm, natural or right for your channel. Our script is also easy: no brand names, no numbers. Listen to all three Spanish Kokoro voices with your own script before you pick one.
Kokoro’s model card lists grades for its English voices but none for Spanish, so we had no vendor claim to check; this table is the only grade we have.
Where this fits
Product walkthroughs, changelog videos, training clips and first drafts of a narration are a good fit: the voice is identical every time, so a correction recorded on Tuesday matches Monday’s take. A human narrator still wins on emotion and on tricky proper names.
If you publish synthetic voice, say so. A line such as “Synthetic voice generated with AI” in the description is enough and costs nothing.
Next steps
- Run your own numbers with our guide to benchmarking a local model in 30 minutes.
- Go the other way, voice to text, with Whisper on your own hardware.
- Make the pictures for the same video on the same machine: ComfyUI batch image generation, about ten images a minute on our DGX Spark (2026-11-02).
- Our creator side lives on j4sgon.com and on YouTube.
Setting up a content pipeline for a company channel? That is a project we take on: book a 15-minute call or see how we work in consulting.