Run your own voice
Kokoro on your own machine, over HTTPS, connected to fireside. No account with a speech provider, no per-character bill, nothing leaving your network but the text you ask it to read.
What Kokoro is
Kokoro is a small open text-to-speech model (82 million parameters) that runs on a CPU. It is quick, it is Apache-2.0, and the voices are prebuilt. What it is not is a server: the model is a file, and something has to answer HTTP requests with it.
The wrapper almost everyone runs is Kokoro-FastAPI. It answers OpenAI's
/v1/audio/speech shape, which is exactly what fireside's voice-server plugin speaks,
so you do not need to write a bridge.
1. Run it
CPU, one command, no build:
docker run --name kokoro-tts --restart unless-stopped -d \
-p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu:latest
With an NVIDIA card, swap the image for kokoro-fastapi-gpu:latest and add
--gpus all. Check it answers:
curl http://localhost:8880/v1/audio/voices
You should get a list of voice names. Nothing else works until that does.
2. Put HTTPS in front of it
The container speaks plain HTTP on 8880. Two things go wrong if you expose that directly: browsers refuse to call an insecure endpoint from a page served over HTTPS, and your speech requests travel in the clear. Terminate TLS at a reverse proxy.
Caddy is the short route, because it gets and renews a certificate by itself. In a
Caddyfile:
kokoro.example.com {
reverse_proxy kokoro:8880
}
That is the whole configuration if Caddy runs in the same Docker network as the container,
with the port reached as kokoro:8880. If Caddy runs on the host instead, publish the
port to loopback only (-p 127.0.0.1:8880:8880) and use
reverse_proxy 127.0.0.1:8880.
nginx is the same idea with more lines: a server block on 443 with
ssl_certificate, ssl_certificate_key, and
proxy_pass http://127.0.0.1:8880;. Certificates come from certbot.
The hwdsl2/docker-kokoro image is the same model with a README that walks through securing the server, the Caddy and nginx examples, CORS and rate limiting in more detail than this page.
3. Two things people hit
- CORS. The server sets no
Access-Control-Allow-Originby default. If you call it from a page on a different origin, add the header at the proxy, not in the container. Fireside calls it server-to-server, so it does not need CORS. - Rate limiting. A public endpoint with no limit is a way for a stranger to spend your electricity. Put a cap per client IP at the proxy.
4. Connect it to fireside
In fireside, open Account → Voice and add a voice server. Give it the base URL
you published, ending in /v1 — for example
https://kokoro.example.com/v1. Leave the key blank unless your proxy asks for one.
Pick a voice, and the next chapter renders through your machine.
Nothing about this costs fireside anything, and nothing about it is metered. Your hardware, your electricity, your text staying where you put it.
If you would rather not run a server
Two other routes, both on the price list: connect your own Microsoft Azure speech key (you pay Azure directly), or add dollars to your wallet and our voice reads to you at the standard rate.
← Back to fireside