Open-weight text-to-speech models are now good enough for audio versions of articles, product explainers and e-learning snippets. The question I wanted answered was practical: what does it actually cost and how long does it take to run one on a plain serverless CPU container, no GPU?
Disclosure: I built the tool used here, a Text to Speech actor on Apify that wraps the open Kokoro model. The measurements below are from its run logs on 5 November 2026.
The test
- Model: Kokoro (82M parameters, open weights), fp16 ONNX build baked into the container image
- Text: the first 1,869 characters of my article on Shopify product markup (plain text, Markdown removed)
-
Voice:
af_heart(US English), speed 1.0 - Output: one MP3, 128 kbit/s mono
- Runtime: serverless container on Apify, CPU only. I ran the exact same input twice: once with 2 GB of memory, once with 4 GB. On this platform more memory also means a larger CPU share.
Results
| 2 GB | 4 GB | |
|---|---|---|
| Model load | 1.0 s | 0.9 s |
| Synthesis time | 209 s | 108 s |
| Audio produced | 130.1 s | 130.1 s |
| Speed vs. real time | 0.62x | 1.2x |
| Total run time (incl. container start) | 228 s | 118 s |
| Compute cost of the run | $0.0229 | $0.0227 |
| MP3 size | 2.08 MB | 2.08 MB |
Two things stand out.
1. Twice the memory, half the time, same bill. Compute here is billed by memory × time. Doubling the memory almost exactly halved the synthesis time, so the cost stayed flat at about 2.3 cents for 1,869 characters. There is no reason to run this at 2 GB. I changed the actor's default to 4 GB after this test.
2. Model loading is not the bottleneck. Loading the model took about one second, because it is baked into the image instead of being downloaded at start. Container start added another ~10–20 seconds. Everything else is pure synthesis, which scales with the length of the text.
What that means per article
From these numbers:
- Throughput at 4 GB: about 17 characters of text per second, or roughly 1.2 seconds of audio per second of compute.
- Raw compute: about $0.012 per 1,000 characters.
- Audio length: 1,869 characters became 130 seconds of speech, so 1,000 characters ≈ 70 seconds of audio at normal speed.
- File size: at 128 kbit/s mono, about 1 MB per minute of audio.
For a typical 6,000-character blog post that is roughly 7 minutes of audio, about 6 minutes of compute at 4 GB, and around 7 cents of raw compute. It is not instant, so generate audio when you publish, not when a reader presses play.
How to make an audio version of a post
The actor takes a list of texts and returns one MP3 (or WAV) per text in a key-value store, with a public URL:
curl -X POST "https://api.apify.com/v2/acts/fast_data_asap~text-to-speech-kokoro/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"texts": [{"id": "my-post", "text": "Paste the plain text of your post here."}],
"voice": "af_heart",
"format": "mp3"
}'
Each result row contains characters, durationSeconds, sizeBytes and audioUrl. Long texts are split at sentence boundaries and joined into one file, so a full article comes back as a single MP3.
Practical tips from the test:
- Strip Markdown first. Code blocks and tables do not read well aloud. I removed them and turned links into plain text before synthesis.
-
Pick the voice by language. The first letter of the voice name sets the language:
aUS English,bUK English,eSpanish,fFrench,iItalian,pBrazilian Portuguese,hHindi. German is not supported by this model. -
Blend voices for a distinct sound, for example
"am_michael:0.6,am_onyx:0.4". - Run it in your publishing pipeline. A webhook from your CMS or an n8n workflow can call the endpoint when a post goes live and store the MP3 URL next to the post.
Pricing
The actor charges $0.02 per started 1,000 characters of successfully synthesized text, with no start fee; empty or failed texts are free. The 1,869-character test above would cost $0.04. Running the open model yourself on your own hardware is cheaper still. The point of a hosted version is that there is nothing to install and it fits into automation tools via one HTTP call.
Data: two runs of the same 1,869-character text on 5 November 2026, Apify serverless containers, CPU only. Your timings will vary with text, voice and platform load.
Top comments (0)