# Unidatum Speech: the full guide for AI coding agents This file is the agents page, the docs, the download page and the R&D notes of https://speech.unidatum.com as one markdown document. The index is https://speech.unidatum.com/llms.txt. # Unidatum Speech for AI coding agents You are an AI coding agent (Claude Code, Codex, Cursor, Aider or similar) and a person asked you to install or use Unidatum Speech. This page is the whole procedure. Plain markdown copy: https://speech.unidatum.com/agents.md Unidatum Speech is a self-hosted speech service that runs on CPU only: live speech to text with partial results and punctuated finals in about a second, recorded-file transcription, and text to speech. It speaks a Deepgram-compatible API (`/v1/listen`, `/v1/speak`), so Deepgram client code needs only a different base URL and key. It is free to use under the Unidatum Speech Free Use Licence (https://speech.unidatum.com/licence/); installing means accepting it, so tell the person you are installing it. ## Install it (one command, no sudo, no browser) ```bash curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --agent ``` `--agent` is the supported automation route. The human download page asks a person to pass a Cloudflare Turnstile check, which an agent cannot do; with `--agent` the installer instead asks the site for a proof-of-work challenge, solves it itself (about a second of hashing with perl, python3 or node), and exchanges the answer for a single-use install code. Everything after that is the same as for a person: the package is verified against its published SHA-256 before anything is unpacked. Before you run it: - **Look first if you like:** `curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --agent --dry-run` downloads and writes nothing and shows the plan. The script is plain POSIX shell, readable at https://speech.unidatum.com/install.sh. - **It takes 3 to 6 minutes** (about 1 GB of speech models are downloaded and hash-checked). A command timeout of 2 minutes will kill it. Run it in the background and poll its log: ```bash curl -fsSL https://speech.unidatum.com/install.sh -o /tmp/unidatum-speech-install.sh nohup sh /tmp/unidatum-speech-install.sh --agent > "$HOME/unidatum-speech-install.log" 2>&1 & # then, every 20 seconds or so, until it ends with "Done." (or an error line): tail -n 5 "$HOME/unidatum-speech-install.log" ``` In Claude Code, the Bash tool's `run_in_background` or a timeout of 600000 ms does the same. - **What it needs:** Linux x86_64, Linux arm64 or macOS on Apple silicon; `curl`, `tar`, `bzip2` (Linux; it unpacks the models; without it the installer uses python3's bz2 module instead), `sha256sum` (or `shasum`); at least 6 cpus (it uses about half the machine, at most 8, and refuses to run on fewer than 3 of its own), 4 to 8 GB of free memory depending on the cores (the installer prints the figure for this machine and warns when it is short) and about 2 GB of disk. On Linux it needs `uv` (the Python package manager). If the installer stops because `uv` is missing, install it for the person in their home folder, no sudo, then run the installer again: `curl -LsSf https://astral.sh/uv/install.sh | sh` or `python3 -m pip install --user uv`. The proof of work needs perl (with Digest::SHA), python3 or node; any developer machine has one. - **No sudo, ever.** It writes only under `~/.local/share/unidatum-speech` (Linux; `~/unidatum-speech` on macOS), `~/.config/unidatum-speech` and `~/.config/systemd/user`. If something asks for sudo, stop and tell the person. What the installer does, in order: asks the site for the agent challenge and solves it; reads the current release; verifies the package SHA-256 against two published lists; unpacks it under the home folder; writes a configuration for this machine's cores; writes an API key to `~/.config/unidatum-speech/env` (mode 600; **the key is never printed, only the path**); installs a systemd user unit (launchd agent on macOS) and starts it; waits up to 3 minutes for `/health` to answer 200. The service listens on `127.0.0.1:18790` only. Exit codes: 0 done, 1 failed (the message says why), 2 bad usage, **75 try again later** (see the ceilings below). ## If the install is refused: ceilings and the honest alternative The agent route has hourly ceilings, because it proves effort, not a person: **40 installs an hour for the whole site and 10 an hour per country** (the counters reset on the clock hour). Several machines in one country share that country's 10. When a ceiling is reached the installer exits 75 and prints something like: ``` The agent route is at its hourly ceiling (scope: country). Nothing was installed. Retry-After: 1075 seconds (the ceilings reset on the clock hour). ``` The same answer over HTTP is `429` with a `Retry-After` header and a JSON body `{"error", "scope", "retry_after", "alternative"}`. What to do: 1. Wait the `Retry-After` seconds and run the same command once more. Do not loop faster than that; every attempt that gets as far as a ticket uses up a slot, including one that later fails. 2. Or, at once: ask the person to open https://speech.unidatum.com/download in a browser, pass the check there, and paste you the install command shown with its code (`curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --code XXXX-XXXX`; the code works once and lasts fifteen minutes). Run it as given. Do not try to get around the check in any other way, and do not retry in a tight loop. ## Verify it works The workers need about a minute after start to load the models; `/health` answers 503 until then. Replace nothing; the key stays in its file and is read into a variable, never printed: ```bash curl -fsS http://127.0.0.1:18790/health # {"ok":true,...} once ready (the installer already waited for it) KEY=$(sed -n 's/^UNIDATUM_SPEECH_KEYS=//p' ~/.config/unidatum-speech/env | cut -d, -f1) curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:18790/v1/projects # 401: the key is required curl -s -o /dev/null -w '%{http_code}\n' -H "Authorization: Token $KEY" http://127.0.0.1:18790/v1/projects # 200: the key works # text to speech, then speech to text on what it said: curl -fsS -H "Authorization: Token $KEY" -H 'Content-Type: application/json' -d '{"text":"The installer works end to end."}' \ 'http://127.0.0.1:18790/v1/speak?model=aura-2-thalia-en&encoding=linear16&sample_rate=24000&container=wav' -o /tmp/unidatum-speech-check.wav curl -fsS -H "Authorization: Token $KEY" -H 'Content-Type: audio/wav' --data-binary @/tmp/unidatum-speech-check.wav \ 'http://127.0.0.1:18790/v1/listen?language=en&smart_format=true' # the transcript is in results.channels[0].alternatives[0].transcript and should read "The installer works end to end." ``` Report to the person: the version installed, that `/health` is 200, that the key file exists (give its path, not its contents), and the round-trip transcript. ## Use it - **Transcribe a recorded file** (wav, flac, ogg or mp3 bytes; no URLs): `curl -fsS -H "Authorization: Token $KEY" -H 'Content-Type: audio/wav' --data-binary @clip.wav 'http://127.0.0.1:18790/v1/listen?language=en&smart_format=true'`. For other formats convert first, e.g. `ffmpeg -i in.m4a -ar 16000 -ac 1 clip.wav`. English uses Parakeet v3; other language codes use Whisper small. - **Speak a sentence:** `POST /v1/speak?model=aura-2-thalia-en&encoding=linear16&sample_rate=24000&container=wav` with `{"text": "..."}` (at most 5000 characters) returns a WAV; play it with `aplay`, `paplay`, `afplay` or `ffplay` if the machine has speakers. The Deepgram-shaped body and `model` names are accepted; the voice behind them is Kokoro. - **Live transcription** is a WebSocket on `/v1/listen` with raw 16 kHz mono 16-bit PCM in about 100 ms frames, `endpointing=350`; the full guide with tested Python, Node and Go clients is https://speech.unidatum.com/docs.md and the Claude Code skill below. - **Base URL and key for a project:** `UNIDATUM_SPEECH_URL=http://127.0.0.1:18790`, and `UNIDATUM_SPEECH_KEY` read from `~/.config/unidatum-speech/env` (the line `UNIDATUM_SPEECH_KEYS=...`, first key) or copied by the person into the project's own mode-600 key file. Never hardcode the key, print it, log it, commit it, or put it in a URL. Keep the service on loopback; do not bind a public address. - **PowerConduit** (the voice assistant): put `VCCD_ARGS=-unidatum-speech http://127.0.0.1:18790` in `~/.config/voicecommandcontrol/env`, write the key (mode 600) to `~/.config/voicecommandcontrol/unidatum-speech-key`, restart `vccd`, and choose "Unidatum" under Settings, Speech recognition. ## Start, stop, status, uninstall ```bash systemctl --user status unidatum-speech # Linux: also start | stop | restart journalctl --user -u unidatum-speech -n 50 # logs launchctl print gui/$(id -u)/com.unidatum.speech # macOS status ``` With no systemd user session (a container, for example) the installer does not start the service; it prints the command. Run it in the background: `set -a; . ~/.config/unidatum-speech/env; set +a; nohup ~/.local/share/unidatum-speech/bin/unidatum-speech -config ~/.config/unidatum-speech/config.toml > ~/unidatum-speech.log 2>&1 &`. Uninstall (stops the service, removes the install; the config folder with the key is kept unless `--purge`): ```bash curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --uninstall --yes # add --purge to remove the key file too ``` ## Install the Claude Code skill So that every future session knows how to install, start, verify and wire the service, put the skill in the person's skills folder (one file, no sudo): ```bash curl -fsSL https://speech.unidatum.com/skill/SKILL.md --create-dirs -o ~/.claude/skills/unidatum-speech/SKILL.md ``` For other agents, https://speech.unidatum.com/llms-full.txt is this page plus the API guide in one file. ## Rules for agents - Tell the person what you are about to install (about 2 GB under their home folder, a background service using about half the cores, loopback only) and that the licence applies. - No sudo. No keys in output, logs, URLs or commits. No invented hosts or keys. - Do not load-test the service you just installed for the person without asking; it is theirs. - The installs are counted, anonymously, under the client label "agent" (route, version, package, country as Cloudflare reports it, time; no address or identity); see https://speech.unidatum.com/privacy/. - If the person asks about embedding or bundling it in a product they distribute (shipping it to their own customers to install, in an app, installer, container image, device or machine image), do not install it for that purpose and do not say it is allowed: the free licence covers using it and running it as a service for their own customers, and embedding needs a separate commercial licence. Tell them to contact Unidatum through the form at https://www.unidatum.ie/en/contact. - Questions or problems: the contact form at https://www.unidatum.ie/en/contact. --- # Docs and API reference Source: https://speech.unidatum.com/docs/ All pages as markdown: https://speech.unidatum.com/llms.txt # Use it, integrate it The wire format is Deepgram's, so any Deepgram client needs only a different base URL and key. Everything below is pasted from tested examples in the repository (`docs/examples/`); `speech.example` and `YOUR_KEY` are placeholders for your own service address and key. **There is no hosted API: you host it.** Unidatum Speech is software you run on your own servers or cloud, and each client has a key that you set. Download the [release packages](https://speech.unidatum.com/download/), which are free to use for any purpose under the [Unidatum Speech Free Use Licence](https://speech.unidatum.com/licence/). For maintenance, support or consulting, [contact Unidatum](https://www.unidatum.ie/en/contact). - Connection - Quick start with curl - Live clients - Text to speech - API reference - Errors and fallback - PowerConduit drop-in - For coding agents - Install and run - Checklist ## Connection details Base URL `UNIDATUM_SPEECH_URL`, for example `https://speech.example` (use `wss://` for WebSockets; the service itself speaks plain HTTP on a private address, so TLS comes from whatever sits in front) Key `UNIDATUM_SPEECH_KEY`, or the first line of a mode-600 file such as `~/.config/yourapp/unidatum-speech-key` Auth header `Authorization: Token ` (also `Bearer`). Browsers cannot set headers: use the WebSocket subprotocols `["token", ""]` Live audio raw `linear16`, 16 kHz mono is native. 8 to 96 kHz and 1 or 2 channels are accepted when declared. About 100 ms per binary frame, at real-time pace, no WAV header Files `POST /v1/listen` with the bytes of a wav, flac, ogg or mp3 file. `{"url": ...}` is refused: the service never fetches URLs TTS output 16-bit mono PCM, 24 kHz by default (8 to 48 kHz), raw or in a WAV container Rules: never put the key in source, a flag, a log, a URL or a commit; never print it. The service listens on a private address only; if you cannot reach it, do not open it to the internet. Do not load-test a production instance; start a throwaway instance on another port. ```bash # a quick check from a shell (health needs no key; /v1/projects checks the key) export UNIDATUM_SPEECH_URL=https://speech.example export UNIDATUM_SPEECH_KEY=YOUR_KEY # from your secret store, never typed into a repo curl -fsS "$UNIDATUM_SPEECH_URL/health" # {"ok":true,"sessions":0,"capacity":8,"final_queue":0,"tts_workers":1,"tts_queue":0,"retention_hours":24,"final_model":"parakeet-v3"} curl -fsS -H "Authorization: Token $UNIDATUM_SPEECH_KEY" "$UNIDATUM_SPEECH_URL/v1/projects" # 200 with a project list; 401 means the key is wrong # the repository's smoke test: health, key, the sample WAV through POST /v1/listen, SMOKE OK docs/examples/smoke.sh ``` ## Quick start with curl ### Recorded audio to text ```bash curl -fsS -X POST "$UNIDATUM_SPEECH_URL/v1/listen?language=en&smart_format=true" \ -H "Authorization: Token $UNIDATUM_SPEECH_KEY" \ -H 'Content-Type: audio/wav' --data-binary @clip.wav # Deepgram's pre-recorded shape; the text is at # .results.channels[0].alternatives[0].transcript # with .words[] (word, start, end, confidence, punctuated_word) ``` ### Text to speech ```bash curl -fsS -X POST "$UNIDATUM_SPEECH_URL/v1/speak?model=aura-2-thalia-en&encoding=linear16&sample_rate=24000&container=wav" \ -H "Authorization: Token $UNIDATUM_SPEECH_KEY" -H 'Content-Type: application/json' \ -d '{"text":"Hello from Unidatum Speech."}' -o hello.wav # container=none gives raw PCM; GET /v1/voices lists voices and the aura-2-* aliases ``` ## Live speech to text: tested clients The query the examples and PowerConduit use: `language=en&encoding=linear16&sample_rate=16000&channels=1&interim_results=true&vad_events=true&endpointing=350&smart_format=true`. Each client sends a 16 kHz mono WAV's samples in 100 ms frames at real-time pace, joins finals until `speech_final` or `UtteranceEnd`, and ends with `CloseStream`. ```python #!/usr/bin/env python3 """Live speech to text over WebSocket /v1/listen. Usage: listen.py clip.wav (16 kHz, mono, 16-bit WAV) Needs: pip install websockets. Env: UNIDATUM_SPEECH_URL (https://speech.example), UNIDATUM_SPEECH_KEY.""" import asyncio, json, os, sys, wave import websockets BASE = os.environ["UNIDATUM_SPEECH_URL"].rstrip("/").replace("http", "ws", 1) # http->ws, https->wss KEY = os.environ["UNIDATUM_SPEECH_KEY"] # never hardcode QUERY = "language=en&encoding=linear16&sample_rate=16000&channels=1&interim_results=true&vad_events=true&endpointing=350&smart_format=true" async def main(path): w = wave.open(path); assert (w.getframerate(), w.getnchannels(), w.getsampwidth()) == (16000, 1, 2), "need 16 kHz mono 16-bit" pcm = w.readframes(w.getnframes()) async with websockets.connect(f"{BASE}/v1/listen?{QUERY}", additional_headers={"Authorization": f"Token {KEY}"}) as ws: async def send(): for i in range(0, len(pcm), 3200): # 100 ms per frame, sent in real time await ws.send(pcm[i:i + 3200]); await asyncio.sleep(0.1) await asyncio.sleep(1.0) # trailing silence so the last utterance endpoints await ws.send(json.dumps({"type": "CloseStream"})) # pending finals, then Metadata sender = asyncio.create_task(send()) turn = [] async for raw in ws: m = json.loads(raw) if m["type"] == "Results": alt = m["channel"]["alternatives"][0] if not m["is_final"]: print("partial:", alt["transcript"]) elif alt["transcript"].strip(): turn.append(alt["transcript"]) # finals of one turn are joined if m["speech_final"]: print("TURN:", " ".join(turn)); turn = [] elif m["type"] == "UtteranceEnd" and turn: print("TURN:", " ".join(turn)); turn = [] elif m["type"] == "SpeechStarted": print("[speech started]") elif m["type"] == "Error": sys.exit(f"service error: {m}") elif m["type"] == "Metadata": break if turn: print("TURN:", " ".join(turn)) await sender asyncio.run(main(sys.argv[1])) ``` The official Deepgram Python SDK also works, pointed at the service with the key as its API key (`service/tests/sdk_stream.py` in the repository). ```js // Live speech to text, Node 22+ (global WebSocket) or a browser. Usage: node listen.mjs clip.wav (16 kHz mono 16-bit WAV) // Env: UNIDATUM_SPEECH_URL (https://speech.example), UNIDATUM_SPEECH_KEY. Browsers cannot set headers, so the key goes in the subprotocol. import { readFileSync } from "node:fs"; const base = process.env.UNIDATUM_SPEECH_URL.replace(/\/$/, "").replace(/^http/, "ws"); const key = process.env.UNIDATUM_SPEECH_KEY; const q = "language=en&encoding=linear16&sample_rate=16000&channels=1&interim_results=true&vad_events=true&endpointing=350&smart_format=true"; const wav = readFileSync(process.argv[2]); const pcm = wav.subarray(44); // a plain PCM WAV has a 44-byte header const ws = new WebSocket(`${base}/v1/listen?${q}`, ["token", key]); ws.binaryType = "arraybuffer"; let turn = []; ws.onopen = async () => { for (let i = 0; i < pcm.length; i += 3200) { ws.send(pcm.subarray(i, i + 3200)); await new Promise(r => setTimeout(r, 100)); } await new Promise(r => setTimeout(r, 1000)); ws.send(JSON.stringify({ type: "CloseStream" })); }; ws.onmessage = (ev) => { const m = JSON.parse(ev.data); if (m.type === "Results") { const alt = m.channel.alternatives[0]; if (!m.is_final) console.log("partial:", alt.transcript); else if (alt.transcript.trim()) { turn.push(alt.transcript); if (m.speech_final) { console.log("TURN:", turn.join(" ")); turn = []; } } } else if (m.type === "UtteranceEnd" && turn.length) { console.log("TURN:", turn.join(" ")); turn = []; } else if (m.type === "Error") { console.error("service error", m); process.exit(1); } else if (m.type === "Metadata") { if (turn.length) console.log("TURN:", turn.join(" ")); ws.close(); } }; ws.onerror = (e) => { console.error("websocket error", e.message ?? e); process.exit(1); }; ``` In a browser, do not ship the key in the bundle: let a backend of yours hold the key and open the stream, as PowerConduit's apps do through vccd. Three ways from Go: the repository's own client package `clients/go` (live streaming with reconnect, recorded audio, TTS, health, typed errors; one dependency, `github.com/coder/websocket`; copy the directory or use a `replace` in `go.mod`, there is no public module proxy), the official Deepgram Go SDK pointed at the service (tested with v3.12.0), or the plain client below. `docs/GO.md` in the repository walks through all three. ```go import us "github.com/OptimalMatch/unidatum-speech/clients/go" c, err := us.FromEnv() // UNIDATUM_SPEECH_URL, UNIDATUM_SPEECH_KEY (or _KEY_FILE) h, err := c.Health(ctx) // GET /health (no key needed): h.OK, h.Sessions, h.Capacity err = c.CheckKey(ctx) // GET /v1/projects: nil = key accepted; *us.APIError otherwise t, err := c.Transcribe(ctx, wavBytes, "audio/wav", "en") // recorded audio: t.Text, t.Words s, err := c.Listen(ctx, us.ListenOptions{...}) // live: *us.Stream res, err := c.Speak(ctx, us.SpeakOptions{Text: "..."}) // TTS, streamed: res.Audio is an io.ReadCloser ``` The smallest possible client, with only `coder/websocket`: ```go // Live speech to text over WebSocket /v1/listen. Usage: go run . clip.wav (16 kHz, mono, 16-bit WAV, 44-byte header) // Env: UNIDATUM_SPEECH_URL (https://speech.example), UNIDATUM_SPEECH_KEY. Module: github.com/coder/websocket. package main import ( "context" "encoding/json" "fmt" "net/http" "os" "strings" "time" "github.com/coder/websocket" ) type msg struct { Type string `json:"type"` IsFinal bool `json:"is_final"` SpeechFinal bool `json:"speech_final"` Channel struct { Alternatives []struct { Transcript string `json:"transcript"` Confidence float64 `json:"confidence"` } `json:"alternatives"` } `json:"channel"` ErrMsg string `json:"err_msg"` } func main() { base := strings.Replace(strings.TrimRight(os.Getenv("UNIDATUM_SPEECH_URL"), "/"), "http", "ws", 1) key := os.Getenv("UNIDATUM_SPEECH_KEY") // never hardcode wav, err := os.ReadFile(os.Args[1]) if err != nil || len(wav) < 44 { panic("cannot read WAV") } pcm := wav[44:] ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) defer cancel() q := "language=en&encoding=linear16&sample_rate=16000&channels=1&interim_results=true&vad_events=true&endpointing=350&smart_format=true" c, resp, err := websocket.Dial(ctx, base+"/v1/listen?"+q, &websocket.DialOptions{HTTPHeader: http.Header{"Authorization": {"Token " + key}}}) if err != nil { if resp != nil { panic(fmt.Sprintf("refused: HTTP %d (401 key, 503 capacity)", resp.StatusCode)) } panic(err) } defer c.CloseNow() go func() { for i := 0; i < len(pcm); i += 3200 { // 100 ms frames in real time end := min(i+3200, len(pcm)) c.Write(ctx, websocket.MessageBinary, pcm[i:end]) time.Sleep(100 * time.Millisecond) } time.Sleep(time.Second) c.Write(ctx, websocket.MessageText, []byte(`{"type":"CloseStream"}`)) }() var turn []string for { _, data, err := c.Read(ctx) if err != nil { return } var m msg if json.Unmarshal(data, &m) != nil { continue } switch m.Type { case "Results": if len(m.Channel.Alternatives) == 0 { continue } t := m.Channel.Alternatives[0].Transcript if !m.IsFinal { fmt.Println("partial:", t) } else if strings.TrimSpace(t) != "" { turn = append(turn, t) if m.SpeechFinal { fmt.Println("TURN:", strings.Join(turn, " ")) turn = nil } } case "UtteranceEnd": if len(turn) > 0 { fmt.Println("TURN:", strings.Join(turn, " ")) turn = nil } case "Error": panic("service error: " + m.ErrMsg) case "Metadata": if len(turn) > 0 { fmt.Println("TURN:", strings.Join(turn, " ")) } return } } } ``` ```kotlin // Android / Kotlin with OkHttp (not run in the repository; same protocol). Prefer a backend that holds the key, as PowerConduit does. val req = Request.Builder() .url("${base.replaceFirst("http", "ws")}/v1/listen?language=en&encoding=linear16&sample_rate=16000&channels=1&interim_results=true&endpointing=350&smart_format=true") .header("Authorization", "Token $key") // key from your secure config, never in source .build() val ws = OkHttpClient().newWebSocket(req, object : WebSocketListener() { override fun onMessage(ws: WebSocket, text: String) { /* parse JSON as in the other clients */ } override fun onFailure(ws: WebSocket, t: Throwable, r: Response?) { /* r?.code: 401 key, 503 capacity -> fall back */ } }) // from AudioRecord (16 kHz, mono, ENCODING_PCM_16BIT), every ~100 ms: ws.send(ByteString.of(*pcmChunk)) // when done: ws.send("""{"type":"CloseStream"}""") ``` ## Text to speech in code ```python #!/usr/bin/env python3 """Text to speech. Usage: speak.py "Hello there." out.wav POST /v1/speak (Deepgram shape) and the WebSocket form. Env: UNIDATUM_SPEECH_URL, UNIDATUM_SPEECH_KEY. pip install websockets""" import asyncio, json, os, sys, urllib.request, wave import websockets URL = os.environ["UNIDATUM_SPEECH_URL"].rstrip("/"); KEY = os.environ["UNIDATUM_SPEECH_KEY"] text, out = sys.argv[1], sys.argv[2] # 1) HTTP: the answer is a WAV (container=wav) that streams sentence by sentence req = urllib.request.Request(f"{URL}/v1/speak?model=aura-2-thalia-en&encoding=linear16&sample_rate=24000&container=wav", data=json.dumps({"text": text}).encode(), headers={"Authorization": f"Token {KEY}", "Content-Type": "application/json"}) open(out, "wb").write(urllib.request.urlopen(req, timeout=60).read()) print("http wav:", out) # 2) WebSocket: raw 16-bit mono PCM chunks, Flushed marks the end of what was sent async def ws_speak(): u = URL.replace("http", "ws", 1) + "/v1/speak?model=aura-2-thalia-en&encoding=linear16&sample_rate=24000&container=none" async with websockets.connect(u, additional_headers={"Authorization": f"Token {KEY}"}) as ws: await ws.send(json.dumps({"type": "Speak", "text": text})); await ws.send(json.dumps({"type": "Flush"})) pcm = b"" async for m in ws: if isinstance(m, bytes): pcm += m elif json.loads(m)["type"] == "Flushed": break await ws.send(json.dumps({"type": "Close"})) return pcm pcm = asyncio.run(ws_speak()) with wave.open(out.replace(".wav", "-ws.wav"), "wb") as w: w.setnchannels(1); w.setsampwidth(2); w.setframerate(24000); w.writeframes(pcm) print("websocket pcm bytes:", len(pcm)) ``` ### The three routes - `POST /v1/speak?model=aura-2-thalia-en&encoding=linear16&sample_rate=24000&container=wav|none`, body `{"text": "..."}`. Deepgram's shape, so existing Deepgram TTS code works. `aura-2-*` names map to Kokoro voices. - `POST /speak`, body `{"text","voice","speed"}`: PowerConduit's Kokoro sidecar style, raw PCM, header `X-Sample-Rate`, trailer `X-Took-Ms`. - `WS /v1/speak` (same query): send `{"type":"Speak","text":"..."}` then `{"type":"Flush"}`; binary PCM frames come back, then `Flushed`. `{"type":"Clear"}` drops pending audio (`Cleared`) for interruptions; `{"type":"Close"}` ends. Limits: 5,000 characters per request; a full queue answers HTTP 503 with `Retry-After`; one speaker per free core (RTF 0.3 to 0.8), so buffer about a second before playing. The first audio arrives after about one sentence (0.4 to 1.2 s). **Optional cloud voices.** A Fish Audio provider exists behind `provider=fish`, off by default. It sends the text to Fish Audio's servers and needs a Fish Audio account and key; everything else stays local. `docs/FISH-AUDIO.md` says what it sends, what it costs and what was not tested. Phase 2's prosody options (`emotion`, `fx`, `normalize`) are on a branch and off by default; see the [roadmap](https://speech.unidatum.com/roadmap/). **Interruptions.** For a voice assistant, `Clear` is how a barge-in stops the speech; the recipe for a client that pauses on sound, confirms with the service's words and resumes after a false alarm is `docs/INTERRUPTIONS.md`, summarised on the [home page](https://speech.unidatum.com/#barge-demo). ## API reference Auth on every route except `/health` and `/metrics`: `Authorization: Token ` or `Bearer `; for browsers `Sec-WebSocket-Protocol: token, `. With no keys configured every request is refused. | Route | What | | --- | --- | | `GET /health` | No auth. `ok`, `sessions`, `capacity`, `final_queue`, `tts_workers`, `tts_queue`, `retention_hours`, `final_model`. 503 while workers load models (about a minute) or if one died. | | `GET /metrics` | No auth. Prometheus text, including `final_fallbacks_total`. | | `GET /v1/projects` | Key check: 200 with a project list, 401 otherwise. PowerConduit calls it with a 3 s timeout before each stream. | | `GET /v1/listen` (WebSocket) | Live audio in, `Results`, `SpeechStarted`, `UtteranceEnd`, `Metadata`, `Error` out. 503 before the upgrade when all sessions are in use. | | `POST /v1/listen` | A wav, flac, ogg or mp3 body; Deepgram's pre-recorded response shape with words and times. | | `POST /v1/speak`, `WS /v1/speak`, `POST /speak` | Text to speech, see above. | | `GET /v1/voices` | Kokoro voices and the `aura-2-*` aliases. | | `GET /v1/transcripts` | The finals kept for the retention period (text, times, language, request id, a hash prefix of the key id). No audio is ever stored. | ### Query parameters of `/v1/listen` | Parameter | Notes | | --- | --- | | `model` | Accepted and ignored (`nova-3` is fine); routing is by language. | | `language` | `en` (default from config): Parakeet final, partials. Another code: Whisper final, no partials, keyterms used. `multi`: Whisper with detection. | | `encoding`, `sample_rate`, `channels` | `linear16` only; 8000 to 96000 Hz (resampled to 16 kHz); 1 or 2 channels (averaged). Anything else is refused with an error. | | `interim_results` | `true` for partials (lower-case, unpunctuated, English only). | | `endpointing` | Pause in ms that ends an utterance; default 300; use about 350 (300 to 400 is the measured range). `false`: only `Finalize` or `CloseStream` ends it (a 30 s cap still applies). | | `utterance_end_ms` | Send `UtteranceEnd` after this much silence (PowerConduit uses 1500). | | `vad_events` | `true` for `SpeechStarted`. | | `punctuate`, `smart_format` | Punctuated, capitalised finals; with both off, plain lower-case words. | | `keyterm`, `keywords` | Up to 50; used by the Whisper route only (as a prompt, 550 characters). Parakeet ignores them. | ### Messages **Control (text frames you send):** `{"type":"KeepAlive"}` every 5 s when you have no audio (the service waits at most 30 s for anything); `{"type":"Finalize"}` forces the pending final (returned with `from_finalize: true`); `{"type":"CloseStream"}`: pending finals, then `Metadata`, then close. `Configure` is accepted and ignored. **A `Results` message** carries `type`, `channel_index`, `start`, `duration`, `is_final`, `speech_final`, `from_finalize`, `channel.alternatives[0].{transcript, confidence, words}` (each word: `word`, `start`, `end`, `confidence`, `punctuated_word`) and `metadata.{request_id, model_info, model_uuid}`. Partial confidence is 1.0; final confidence is the mean word probability (Whisper) or 1.0 (Parakeet). Word times on partials are emission times, on finals acoustic times. **The five fields PowerConduit reads, all present on every `Results`:** `type`, `is_final`, `speech_final`, `channel.alternatives[0].transcript`, `channel.alternatives[0].confidence`. A turn ends on `speech_final: true` or on `UtteranceEnd`; join the finals received since the last turn end; ignore empty transcripts; do not act on partials for commands. `SpeechStarted` and `UtteranceEnd` carry `"channel": [0, 1]`, a list, as Deepgram's do. ## Errors, fallback, reconnect, backpressure | Situation | What you see | What to do | | --- | --- | --- | | Wrong or missing key | HTTP 401 on the handshake, `{"err_code":"INVALID_AUTH"}` | Do not retry; report a configuration error without printing the key. | | All sessions busy | HTTP 503 `{"err_code":"CAPACITY"}` before the upgrade | Back off 1 to 2 s, retry once or twice, then fall back. | | Service down or unreachable | Connection refused or timeout | Fall back. | | Unsupported encoding or bad parameter | HTTP 400 or an `Error` message | Fix the request. | | Final pass overloaded | Finals arrive as unpunctuated lower-case text (the fast text after 8 s) | Reduce load; nothing to handle in code. | | Connection drops mid-stream | Socket closed without `Metadata` | Open a new stream; there is no resume. Keep the last seconds of audio in a ring buffer and resend them if the sentence matters. | - **Fallback to Deepgram** is a different base URL and key. Before each new stream call `GET /v1/projects` with a short timeout; if it fails, hear with Deepgram (`wss://api.deepgram.com`), tell the user, and try the service again at the next stream. Deepgram wants `endpointing=800` and takes keyterms in English; the service wants about 350 and ignores keyterms in English. - **Reconnect** with a small backoff (0.5 s, 1 s, 2 s, max 5 s) and a new key check; never in a tight loop. - **Backpressure:** send at real-time pace. Do not burst a whole file faster than about 2x real time on a shared host: the final workers are the bottleneck and a flood delays everyone's finals. If your sender falls behind, drop the oldest audio. On TTS, honour `Retry-After`. - **Health:** a load balancer or your own fallback logic can use `sessions >= capacity` from `/health`. ## Drop-in for PowerConduit PowerConduit's service, vccd, takes the address from a flag, else the environment, else a file in `~/.config/voicecommandcontrol/`, and the key from the environment or a mode-600 file (never a flag). Choose the engine in Settings, Speech recognition: Deepgram, **Unidatum**, Whisper server, Whisper phone; or by voice with the assistant's `hearing` control (`unidatum`, `deepgram`, `whisper`, `phone`). The choice is per device and a new install never defaults to Unidatum. | What | Flag | Environment | File | | --- | --- | --- | --- | | Service address | `-unidatum-speech https://speech.example` | `UNIDATUM_SPEECH_URL` | `unidatum-speech-url` | | Its key | none, never a flag | `UNIDATUM_SPEECH_KEY` | `unidatum-speech-key` (mode 600) | | Pause that ends a turn | `-unidatum-endpointing 350ms` | | | - **Endpointing** is 350 ms for this engine; Deepgram's 800 ms would add to the second decoding pass. - **Fallback:** before a stream vccd calls `GET /v1/projects` (3 s). If it fails, the key is refused, there is no address or the stream will not open, vccd hears with Deepgram and shows a notice; the setting is kept and retried at every new stream. - **Turn-taking:** vccd ends a turn on held finals after 2 s with no news, and a held final goes after 10 s whatever is heard; it watches partials for the wake word too. - **Roll back:** remove the address and restart vccd. ```bash # ~/.config/voicecommandcontrol/env on the machine that runs vccd VCCD_ARGS=-unidatum-speech https://speech.example # the key in its own file, readable by you only umask 077 printf '%s\n' "$UNIDATUM_SPEECH_KEY" > ~/.config/voicecommandcontrol/unidatum-speech-key systemctl --user restart vccd # then pick "Unidatum" under Settings > Speech recognition, or say: set hearing to unidatum ``` Deepgram stays available: PowerConduit falls back to it when this service is unreachable. Without a Deepgram key there is nothing to fall back to. ## For coding agents (Claude Code and others) An agent can install the service for you, start it, check it and wire a project to it. Tell it: *"Install Unidatum Speech from speech.unidatum.com and verify it works."* The procedure it follows is the [agents page](https://speech.unidatum.com/agents/) (also [as markdown](https://speech.unidatum.com/agents.md), with the whole site in [llms.txt](https://speech.unidatum.com/llms.txt) and [llms-full.txt](https://speech.unidatum.com/llms-full.txt)). The installer has a supported automation route, `--agent`: it solves a short proof of work instead of the download page's check, then does everything a person's install does (checksum verified, no sudo, the key written to a private file and never printed). It is limited to 40 installs an hour for the site and 10 per country, and says when to retry. The skill is one file. It carries the install steps, the verification, and the integration details (connection, audio format, the query to use, event parsing, errors and fallback, a tested Python client). It contains no keys. Agents get the base URL from `UNIDATUM_SPEECH_URL` and the key from `UNIDATUM_SPEECH_KEY` or a mode-600 file, and are told never to hardcode, print, log or commit a key, never to put it in a URL, and not to make up keys or hosts. A prompt that works for a project: *"Add speech to text to this app using Unidatum Speech. Use the unidatum-speech skill, use endpointing 350, join finals until speech_final, fall back to Deepgram on 401, 503 or connection failure, and add a smoke test that runs when the key is set."* ```bash # install the service (no sudo, 3 to 6 minutes; --dry-run shows the plan first) curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --agent # install the skill for every project you work on (one file) curl -fsSL https://speech.unidatum.com/skill/SKILL.md --create-dirs -o ~/.claude/skills/unidatum-speech/SKILL.md # what the skill gives the agent # - install, start, stop, verify, uninstall # - connection details, audio format, the query to use, event parsing # - a tested Python client; Node and Go guides in the repository # - errors, fallback to Deepgram, reconnect and backpressure rules ``` ## Install and run the service ### Linux (systemd user unit) ```bash # unpack the release, then: downloads about 1 GB of models, checks their hashes, starts nothing packaging/install.sh --profile # a profile from config/, its cpu lists edited for your machine echo "UNIDATUM_SPEECH_KEYS=$(openssl rand -hex 24)" >> ~/.config/unidatum-speech/env # private file, never commit it systemctl --user daemon-reload && systemctl --user enable --now unidatum-speech curl -s localhost:18790/health # validate a profile without starting (refuses more than half the cores, efficiency cores, overlaps) unidatum-speech -check -config ~/.config/unidatum-speech/config.toml ``` ### macOS, Apple silicon (launchd, no root) ```bash # cross-compile on a build host, copy service/ to the Mac with the binary at packaging/unidatum-speech GOOS=darwin GOARCH=arm64 go build ./cmd/unidatum-speech START=1 packaging/install-macos.sh --profile mac-mini-m4 # or mac-mini-m1 packaging/stop-macos.sh # stop and remove # build and test from source cd service && go build ./cmd/unidatum-speech && go test ./... ``` **Configuration** is one TOML profile per host: `listen` (bind a private address, never a public interface), `[auth]` keys from `UNIDATUM_SPEECH_KEYS` in the environment file, `[cpu]` with `max_cpus`, `max_fraction = 0.5` and `exclude_efficiency_cores`, the `[fast]`, `[final]` and `[tts]` cpu lists, worker counts, model directories, `max_sessions` and `timeout`, `[retention]` (`transcripts = "24h"`; `"0s"` stores nothing) and `[defaults]` (`language`, `endpointing_ms`). Sizing: about 0.2 to 0.6 CPU-seconds per audio second for speech to text and RTF 0.3 to 0.6 per thread for TTS. Several hosts go behind a round-robin proxy that reads `/health`. ## Drop-in checklist, and common mistakes - Base URL from `UNIDATUM_SPEECH_URL` (or config), key from `UNIDATUM_SPEECH_KEY` or a mode-600 file; nothing hardcoded or logged. - Live audio is 16 kHz mono linear16 in about 100 ms binary frames at real-time pace; `CloseStream` at the end; `KeepAlive` when idle. - `endpointing=350`, `interim_results=true`, `smart_format=true`; `vad_events=true` if you show "speaking". - Join finals until `speech_final` or `UtteranceEnd`; ignore empty transcripts; do not act on partials for commands. - Keyterms only if the language is not English (or `multi`). - Handles 401, 503 and connection failure; falls back to Deepgram or tells the user; retries the service at the next stream. - A smoke test in your repo that runs against the sample WAV, skipped when the key is not set. The key is not in the repo, the CI log, the crash report or the UI. - Sending a WAV with its header as live audio, or the wrong sample rate without saying `sample_rate=`: garbage or no text. - Keeping `endpointing=800` from Deepgram: turns end half a second later than needed. - Treating partials as final, or discarding finals that arrive without `speech_final` (they are parts of the turn; join them). - Expecting keyterms to fix an English misrecognition, punctuation in partials, partials for non-English speech, a first partial before about 0.95 s, or a final as fast as Deepgram's. - Opening many streams from one client "to be safe": a host has 6 to 8 sessions in total. - Waiting for `Metadata` forever: it comes only after `CloseStream`. - Opening the service port to the internet or a LAN beyond the private network. --- # Download Source: https://speech.unidatum.com/download/ All pages as markdown: https://speech.unidatum.com/llms.txt # Release packages Packages for Linux x86_64, Linux arm64 (AWS Graviton and other aarch64 servers) and macOS Apple silicon, built by the release workflow from a tag, each with its SHA-256. Models (about 1 GB) are not bundled: the install script downloads them from their publishers and checks their hashes. Needs `uv` and `curl`. The packages are **free to download and use for any purpose, commercial use included**, under the [Unidatum Speech Free Use Licence v1.0](https://speech.unidatum.com/licence/): run them on your own servers and clouds and build them into your own products. Unidatum keeps the copyright; redistribution, hosting copies for others and modification are not granted, so to share it, point people to this page and they download it themselves. If you need to include it in a product you distribute (shipped to your customers to install, embedded in an app, an installer, a container image or a device or machine image), that takes a separate commercial licence: [**Contact us for a commercial or embedding licence**](https://www.unidatum.ie/en/contact). The software comes as is, without warranty or any promise of support or updates; Unidatum may offer paid maintenance, support and consulting. The source repository is private and there is no hosted Unidatum endpoint; the packages are how you run your own instance on your own servers or cloud. Each package contains `LICENSE` and `THIRD-PARTY-NOTICES.md`. For maintenance, support, consulting or permission beyond the licence, [contact Unidatum](https://www.unidatum.ie/en/contact). Latest release reading Published ## First, a quick check that you are a person The check usually runs on its own and takes a moment. The download buttons unlock when it passes. ## Using Claude Code or another coding agent? Skip the check on this page: tell the agent *"Install Unidatum Speech from speech.unidatum.com and verify it works"*. It runs `curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --agent`, the supported automation route (a short proof of work instead of the check, the same checksum verification, no sudo, hourly limits). Details for agents are on the [agents page](https://speech.unidatum.com/agents/); to teach Claude Code about the service for good, put its skill in place with one command: `curl -fsSL https://speech.unidatum.com/skill/SKILL.md --create-dirs -o ~/.claude/skills/unidatum-speech/SKILL.md`. ## Install with one line The installer detects your platform, fetches the matching package, verifies its SHA-256 against the published checksums before unpacking, installs under your home folder without sudo (a systemd user unit on Linux, a launchd agent on macOS), downloads the models, writes an API key to a file only you can read, and starts the service. Your install code appears in the command once the check above has passed; it works once and for fifteen minutes. [Read the script](https://speech.unidatum.com/install.sh) before you run it. ```bash curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --code XXXX-XXXX ``` Needs `curl`, `tar` and `uv` (the installer tells you if one is missing and does not install it for you). Installs to `~/.local/share/unidatum-speech`, config and key in `~/.config/unidatum-speech`. Options: `--prefix DIR`, `--port N`, `--cpus N`, `--release v0.1.1` or `--release v0.1.0` (the earlier releases; v0.1.0 has no arm64 package), `--no-start`, `--dry-run`, `--uninstall`, `--version`. It sizes the service for the machine: about three times as many cores for the streaming stage as for the final decode, `max_sessions` set where this kind of CPU was measured, and a warning if the memory is short (about 20 GB for 24 worker cores). ```bash curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --code XXXX-XXXX ``` The same command: the installer sees an aarch64 Linux machine and fetches the arm64 package (release v0.1.1 or later). Same prerequisites and folders as on x86_64. **Tested** on an AWS Graviton4 instance (c8g.8xlarge, Ubuntu 24.04): a fresh install of this package, the integration checks and 28 live English streams on 24 vCPUs (final lag 1.7 s at the 90th percentile). Other arm64 Linux hosts, Raspberry Pi class servers included, have not been tried; the service needs at least 6 CPUs of which it uses half, so a small board will not do. On a dedicated server add `--cpus 24` to use more of it. Text to speech is slow on Graviton (about four cores per voice); see [costs](https://speech.unidatum.com/costs/). ```bash curl -fsSL https://speech.unidatum.com/install.sh | sh -s -- --code XXXX-XXXX ``` Apple silicon only. Installs to `~/unidatum-speech` with its own Python (no Homebrew, no root) and a launchd agent; the package's installer fetches `uv` itself and checks its checksum. The same options as on Linux. Download the package for your platform below, check its hash, unpack it and run `packaging/install.sh` (Linux, x86_64 or arm64) or `packaging/install-macos.sh` (macOS) from inside it; the steps are under "Install in short". Reading the release list. ### Verify what you downloaded Every package has a `.sha256` file beside it and the release's [SHA256SUMS](https://speech.unidatum.com/dl/SHA256SUMS) lists them all, in the format `sha256sum -c` reads. The hash shown under each button is the same value, so you can compare it by eye. ### Install in short 1. Unpack the package for your platform after checking its hash. 2. Linux: `packaging/install.sh --profile `, put `UNIDATUM_SPEECH_KEYS=` in `~/.config/unidatum-speech/env`, then `systemctl --user enable --now unidatum-speech`. 3. Mac: `START=1 packaging/install-macos.sh --profile mac-mini-m4` (or `mac-mini-m1`). 4. Edit the profile's cpu lists for your machine; the service refuses a plan over half the cores. `unidatum-speech -check -config ` tells you before it starts. 5. Bind a private address only. Point clients at it with `UNIDATUM_SPEECH_URL` and `UNIDATUM_SPEECH_KEY`; see the [docs](https://speech.unidatum.com/docs/). ## What a release contains ### Unidatum Speech v0.1.2 Licence update: the **Unidatum Speech Free Use Licence** now says plainly that embedding or bundling the software in a product or service that is distributed to third parties needs a separate written commercial licence from Unidatum. The service code is unchanged from v0.1.1. #### What's new in v0.1.2 - **Embedding needs a commercial licence.** Shipping the software to your own customers to install, or embedding or bundling it in an app, an installer, a container image, or a device or machine image, needs a separate written commercial licence from Unidatum, on separate terms and fees. Ask through the contact form at https://www.unidatum.ie/en/contact; the licence page and the download page have a "Contact us for a commercial or embedding licence" link. - **Unchanged and still free:** running the software as a service for your own customers, and internal deployment in your organisation. A commercial licence covers Unidatum's own software only; the third-party components stay under their own licences. - The installers print a short note about it, and the README, AGENTS.md, the integration guide, llms.txt, the agents page and the Claude Code skill say it too (agents tell people who ask about embedding to contact Unidatum). - v0.1.2 is the default on the download page; v0.1.1 and v0.1.0 stay available (`--release v0.1.1`). - `unidatum-speech-0.1.2-linux-amd64.tar.gz`: Linux x86_64. - `unidatum-speech-0.1.2-linux-arm64.tar.gz`: Linux aarch64 (AWS Graviton and other arm64 servers). - `unidatum-speech-0.1.2-macos-arm64.tar.gz`: macOS Apple silicon. The packages are offered above, behind the check; the notes are in `docs/releases/v0.1.2.md` in the repository. ### Unidatum Speech v0.1.1 Adds the **Linux arm64 package** (AWS Graviton and other aarch64 hosts). The service code is unchanged from v0.1.0; the packages differ by two new profiles and a README paragraph. #### What's new in v0.1.1 - **Linux arm64 package** on the download page, with its own tab and the same one-line command: the installer (`install.sh`, version 1.1) detects aarch64 Linux and fetches the arm64 package. v0.1.1 is the default; v0.1.0 stays available (`--release v0.1.0`, which has no arm64 package). - **A better automatic profile for new machines.** The streaming (fast) stage gets about three times the cores of the final stage, because the benchmarks showed it is the stage that limits live streams. `max_sessions` is set at 85 percent of the measured clean count where the CPU kind was measured (Graviton4: 24 per 24 cpus; AMD EPYC: 17 per 24 cpus) and left to the service's default elsewhere. It prints the memory the workers need (about 20 GB for 24 worker cores) and warns if the machine is short. New option `--cpus N` for dedicated servers. - **Measured Graviton4 and AMD EPYC results** on the cost and performance pages, replacing the earlier projections for those types. - `unidatum-speech-0.1.1-linux-arm64.tar.gz`: Linux aarch64. Go server binary (cross-compiled, no cgo), Python workers, configs, `packaging/install.sh`, systemd user unit template. **New.** - `unidatum-speech-0.1.1-linux-amd64.tar.gz`: Linux x86_64 (as v0.1.0, plus the EC2 profile `ec2-c7a-24vcpu`). - `unidatum-speech-0.1.1-macos-arm64.tar.gz`: macOS Apple silicon (as v0.1.0). The packages are offered above, behind the check; the notes are in `docs/releases/v0.1.1.md` in the repository. ### Unidatum Speech v0.1.0 First release. A CPU-only, Deepgram-compatible speech service to host on your own servers or cloud: streaming and file speech to text, Kokoro text to speech, a Mac mini edition. No GPU, no cloud API, audio is never stored. - `unidatum-speech-0.1.0-linux-amd64.tar.gz`: Linux x86_64. Go server binary, Python workers, configs, `packaging/install.sh`, systemd user unit template. - `unidatum-speech-0.1.0-macos-arm64.tar.gz`: macOS Apple silicon. Go binary, workers, configs, `packaging/install-macos.sh`, launchd plist, `stop-macos.sh`. The packages are offered above, behind the check; the notes are in `docs/releases/v0.1.0.md` in the repository. ### Licences of what is inside The service's own code is Unidatum's, under the [Unidatum Speech Free Use Licence](https://speech.unidatum.com/licence/). It runs third-party models and runtimes under their own licences, read from their model cards and repositories: NVIDIA's Parakeet-TDT 0.6B (CC-BY-4.0, credit required), OpenAI's Whisper through CTranslate2 (MIT), Kokoro-82M (Apache-2.0), Silero VAD (MIT) and sherpa-onnx (Apache-2.0); the streaming FastConformer model is NVIDIA's. None of the licences read restricts commercial use; several ask for credit. The [licence page](https://speech.unidatum.com/licence/#third-party) lists every component with its licence and credit. The install script names the source of each download and checks its hash. ### Why the check The package addresses are plain and permanent, so the page asks Cloudflare Turnstile to confirm a person is asking before it hands one out, as every Unidatum product download page does. It is the only thing this site loads from another host, only on this page, and it sets no cookie of ours. A browser that cannot run it can continue instead after a few seconds of computation in the page, with a small hourly limit on how many can. ## For scripts and agents The page lists releases with JavaScript; the same data is plain: https://speech.unidatum.com/dl/latest.json (versions, files, sizes, SHA-256) and https://speech.unidatum.com/dl/SHA256SUMS (for `sha256sum -c`). Packages need a ticket; an AI coding agent uses `install.sh --agent`, described at https://speech.unidatum.com/agents.md. --- # R&D index Source: https://speech.unidatum.com/rnd/ All pages as markdown: https://speech.unidatum.com/llms.txt # Research and development notes The reasoning and the measurements behind the design, written up so that anyone can check them. Each note says what was **measured** by us, what was **sourced** from a vendor's page (with the page and the date it was read), what is **modelled** (theory with stated assumptions, drawn dashed, with its script linked) and what is only an **assumption**. - [measured] our own runs: solid lines and bars, data files linked - [sourced] a price or fact read from a vendor page, with the page and date - [modelled] theory or a what-if: **dashed lines, hatched bars, a dashed frame**, its assumptions listed under the chart and the model script linked - [assumption] an input we chose, editable in the data ## Notes ### [50 simultaneous calls, 08:00 to 23:00](https://speech.unidatum.com/rnd/50-calls/) A low-cost design for 50 voice-agent calls at once, 15 hours a day: Graviton4 sizing, monthly cost by way of buying against Deepgram and own hardware, a diurnal load, text to speech local against cloud, architecture, runbook, test plan and go or no-go. [measured] [sourced] [modelled] ### [Serverless and Cloudflare for live speech](https://speech.unidatum.com/rnd/serverless-cloudflare/) Can the service run on Cloudflare Containers, Workers and Workers AI? Real time against batch, the cold start measured, a base plus burst hybrid with a measured mid-call handoff, the cost model and the verdict. [measured] [sourced] [modelled] ### [The cost model](https://speech.unidatum.com/costs/) Cost per busy stream-hour and per month against Deepgram's published prices, on our own machines and on AWS, from the data files in the repository. [measured] [sourced] [modelled] [assumption] ### [Graviton4 and AMD benchmark on EC2](https://speech.unidatum.com/performance/#ec2) The same concurrency test on a c7a (AMD), a c7i (Intel) and a c8g (Graviton4): streams per vCPU at the knee, and why Graviton4 is the first choice. [measured] ### [Why CPU and not GPU](https://speech.unidatum.com/#why-cpu) Cost, operations and supply reasons for CPU-only speech, the honest limits where a GPU wins, and the rule: stay on CPU until a model needs a GPU for quality. [measured] [sourced] ### [Interruption handling (barge-in)](https://speech.unidatum.com/#barge-in) The signals a voice assistant needs to give way when the person starts talking: speech-started events, partials and finals, with latency and false-trigger measurements. [measured] ### [Text to speech, phase 2](https://speech.unidatum.com/roadmap/) A survey of open-weight emotive voices, the speed measurements on CPU, the prosody layer and the staged plan (shown on the roadmap). [measured] [modelled] Every number comes from the data files in the repository ([`costs.csv`](https://speech.unidatum.com/data/costs.csv), [`cloudflare_coldstart.csv`](https://speech.unidatum.com/data/cloudflare_coldstart.csv), [`cloudflare_handoff.csv`](https://speech.unidatum.com/data/cloudflare_handoff.csv) and the others under `/data/`), and each page has a markdown copy for agents (add `.md`); the index of all pages is [llms.txt](https://speech.unidatum.com/llms.txt). New notes are added to this list as they are written. --- # R&D: Serverless and Cloudflare for live speech Source: https://speech.unidatum.com/rnd/serverless-cloudflare/ All pages as markdown: https://speech.unidatum.com/llms.txt # Serverless and Cloudflare for live speech Can a CPU speech service (a Go front and Python workers, about 1 GB of models) run on Cloudflare's serverless products, and what changes when the audio is live instead of a file? Short answer: **serverless is a good fit for batch and for bursts, and a poor fit for the first caller of a live stream.** The design that works is an always-on base with serverless as the overflow. - [measured] our own runs: solid lines and bars, data files linked - [sourced] a price or fact read from a vendor page, with the page and date - [modelled] theory or a what-if: **dashed lines, hatched bars, a dashed frame**, its assumptions listed under the chart and the model script linked - [assumption] an input we chose, editable in the data - Verdict - What Cloudflare offers - Cold start - Real-time fit - Cost model - Base plus burst - Scenarios - Architecture - Drawbacks - Not yet measured - Sources ## Verdict ### Live streaming **Run it warm, not scale-to-zero.** Cloudflare Containers can carry the service, but only as many small always-on boxes: 4 vCPU at most, amd64 only, public beta, no autoscaling, two to three streams each, about $0.125 per busy stream-hour [estimate] against $0.040 on EC2 Graviton4 [measured] capacity and $0.288 on Deepgram [sourced]. ### Batch **A good fit.** A container job that wakes, drains a queue and sleeps costs about $0.65 per 1,000 audio minutes [estimate], against Deepgram's $4.30 [sourced]. A cold start does not matter for a file. ### The first caller **"Slow first, then fine" is half true.** Once the service is up, the first session is as fast as any later one [measured]. But an idle instance goes back to sleep and repeats the whole start on the next wake-up: about 10 to 20 seconds for a Cloudflare container [estimate]. ### Base plus burst **The right shape.** An always-on base sized for the normal load, burst capacity warmed ahead of need and only given calls after it passes a test, live calls never moved, a hosted provider as the last overflow. It saves about 70% on spiky traffic against sizing for the peak [estimate], and EC2 spot is about five times cheaper than Cloudflare containers as the burst tier. Any base plus overflow design beats sending everything to Deepgram from about 51,000 minutes a month [estimate]; a serverless or spot burst tier beyond Deepgram overflow starts to pay at about a million minutes a month. Below 50,000 minutes a month, a hosted provider alone is simpler and cheaper. ## What Cloudflare offers today Everything here was read from Cloudflare's own pages on 2026-12-05 [sourced]; the date in brackets is each page's own *last modified* date. "Not found" means the page does not say. | Item | What the documentation says | Source | | --- | --- | --- | | Status | Available on the Workers Paid plan; launched in beta in June 2025; the newer scheduling policy is "in public beta". No page read says generally available. | [containers](https://developers.cloudflare.com/containers/) (2026-12-03), [scheduling policy](https://developers.cloudflare.com/containers/configuration/scheduling-policy/) (2026-12-03) | | Largest instance | **4 vCPU, 12 GiB, 20 GB disk** (standard-4); custom sizes allowed within the account limits (15,000 vCPU and 60 TiB memory in total; 50 GB of images). | [limits](https://developers.cloudflare.com/containers/platform/limits/) (2026-12-03) | | CPU | "Containers should be built for the linux/amd64 architecture." No ARM. What a vCPU is, and its speed: not found. | [architecture](https://developers.cloudflare.com/containers/concepts/architecture/) (2026-12-03) | | Cold start | "Can often be in the 1-3 second range, but this is dependent on image size and code execution time." With the newer policy, a benchmark of small sandboxes gave a median of 648 ms. | [faq](https://developers.cloudflare.com/containers/faq/) (2026-12-03), [blog](https://blog.cloudflare.com/faster-agent-sandboxes/) (2026-09-30) | | Sleep | An inactivity timeout of up to 6 hours; without one the container stops shortly after its Durable Object goes idle; billing stops when it sleeps. An open WebSocket keeps the Durable Object active. | [API](https://developers.cloudflare.com/containers/api/durable-object-container/) (2026-12-03), [WebSocket example](https://developers.cloudflare.com/containers/examples/websocket/) (2026-12-03) | | Autoscaling | "Not today", planned. Routing over a pool is the developer's job; `max_instances` defaults to 20. | [faq](https://developers.cloudflare.com/containers/faq/) (2026-12-03), [rollouts](https://developers.cloudflare.com/containers/configuration/rollouts/) (2026-12-03) | | Placement | Chosen by Cloudflare from request routing, capacity and image availability. The Durable Object and its container "are not guaranteed to run in the same location". | [faq](https://developers.cloudflare.com/containers/faq/) (2026-12-03) | | Price | CPU $0.000020 per vCPU-second, **billed on active use**; memory $0.0000025 per GiB-second and disk $0.00000007 per GB-second, billed on what is provisioned while the container runs; egress $0.025 per GB in North America and Europe (1 TB included). Some allowances are included on the Workers Paid plan. | [pricing](https://developers.cloudflare.com/containers/platform/pricing/) (2026-11-13) | | GPU | Not found on any Containers page. | limits, pricing, faq (2026-11-13 to 2026-12-03) | | Item | What the documentation says | Source | | --- | --- | --- | | Workers limits | 128 MB memory per isolate; CPU time per request 30 s by default, 5 minutes at most on the paid plan; no limit on how long a client stays connected. A 0.6-billion-parameter model (our final worker alone uses 1.4 GB) does not fit. | [limits](https://developers.cloudflare.com/workers/platform/limits/) (2026-11-25) | | Workers price | $5 a month minimum; a WebSocket is one request, and messages routed through a Worker are not billed; no charge for duration. | [pricing](https://developers.cloudflare.com/workers/platform/pricing/) (2026-12-03) | | Durable Objects | $12.50 per million GB-seconds after 400,000; a WebSocket accepted by an object is billed on its duration for as long as it is connected; hibernation stops billing only for objects that are WebSocket servers and idle. A proxy in front of a container cannot hibernate while streams are open. | [pricing](https://developers.cloudflare.com/durable-objects/platform/pricing/) (2026-11-13), [WebSockets](https://developers.cloudflare.com/durable-objects/best-practices/websockets/) (2026-11-18) | | WebSocket idle timeout | Cloudflare closes a WebSocket with no data "for a period of time"; **no number is published**. The "100 seconds" often quoted comes from a forum post, not the documentation. A release of Cloudflare's network "may restart servers, which terminates WebSockets connections". | [websockets](https://developers.cloudflare.com/network/websockets/) (2026-08-14), [connection limits](https://developers.cloudflare.com/fundamentals/reference/connection-limits/) (2026-11-13) | | Tunnel | "Available on all plans"; up to 25 replicas (100 connections) per tunnel, traffic to the closest replica. **No page states a price.** | [tunnel](https://developers.cloudflare.com/tunnel/) (2026-11-18), [configuration](https://developers.cloudflare.com/tunnel/configuration/) (2026-12-03) | | Load Balancing | "Starting at $5/mo"; pools tried in order with a fallback pool; an unhealthy endpoint gets no new requests but existing WebSocket connections "are not terminated"; session affinity by cookie, cookie plus IP or header; monitors can match status code or a body substring (minimum interval 15 s on the limits page, 60 s on Pro on the monitor page: the two disagree). | [plans](https://www.cloudflare.com/plans/network-cdn.md), [health details](https://developers.cloudflare.com/load-balancing/understand-basics/health-details/) (2026-04-16), [planned maintenance](https://developers.cloudflare.com/load-balancing/additional-options/planned-maintenance/) (2026-07-23), [session affinity](https://developers.cloudflare.com/load-balancing/understand-basics/session-affinity/) (2026-11-04) | | R2 | $0.015 per GB-month, egress free. Download speed into a container: not found; a mounted bucket is "not native SSD-like performance". Baking the models into the image is the safe choice. | [pricing](https://developers.cloudflare.com/r2/pricing/) (2026-10-30) | | Item | What the documentation says | Source | | --- | --- | --- | | Speech to text | Whisper (three sizes), **Deepgram Nova-3** (REST $0.0052 and WebSocket $0.0092 per audio minute) and **Deepgram Flux** (WebSocket $0.0077). Deepgram's own streaming price for Nova-3 is $0.0048. Rate limit for speech recognition: 720 requests per minute. | [pricing](https://developers.cloudflare.com/workers-ai/platform/pricing/) (2026-11-18), [limits](https://developers.cloudflare.com/workers-ai/platform/limits/) (2026-09-17) | | Text to speech | Deepgram Aura-1 and Aura-2 (English, Spanish) at the same price as Deepgram direct; MeloTTS is listed as deprecated from 2026-11-20. | [models](https://developers.cloudflare.com/workers-ai/models/) (2026-08-12) | | Realtime, voice agents | The WebRTC SFU is $0.05 per GB of egress (first 1,000 GB free); RealtimeKit's transcription uses Deepgram Nova-3; the Agents voice SDK (beta) plugs in speech providers but offers no bring-your-own-model pipeline. None of it hosts our workers. | [SFU](https://developers.cloudflare.com/realtime/sfu/platform/pricing/) (2026-09-22), [RealtimeKit](https://developers.cloudflare.com/realtime/realtimekit/platform/pricing/) (2026-11-05), [voice](https://developers.cloudflare.com/agents/agent-class/communication-channels/voice/) (2026-11-21) | ## Cold start: where the time goes We started the service from nothing on a spare set of cores and a separate port (never the running service), with the model files evicted from the operating system's cache so that they came from disk, and timed it [measured]. **Process start to ready took 8.0 to 8.7 seconds** (6.2 s with a warm cache). The service reports healthy only after every worker has loaded, so ready means "can take a stream". The critical path is the final worker loading Whisper small (5.2 s) and then Parakeet (2.6 s) one after the other; the streaming workers load in parallel in 3.9 s. **Then the first stream was no slower than later ones:** first partial 0.90 to 0.91 seconds on the very first session and on the second. There is no warm-up inside the service. On Cloudflare the container start (1 to 3 s from the documentation) and an image pull come first. Our image is about 2 GB; pulling it to a host that does not have it is not documented and was not measured, so the Cloudflare columns are an [estimate] of **10 to 20 seconds for the first caller** after an idle period. *Chart: Cold start: seconds until the first caller can be served. Four local runs are measured (process start to ready). The two Cloudflare columns are estimates: the container start is from the docs, the image pull is not measured. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Cold-start timeline: models loaded against seconds since the caller arrived. Measured: the local service started from nothing with the files on disk. Dashed: the same loading after a Cloudflare container start and image pull (estimates). The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* | event | seconds | models loaded of 7 | status | | --- | --- | --- | --- | | process start | 0 | 0 | [measured] | | three fast workers loaded | 4.6 | 3 | [measured] | | Whisper small loaded in both final workers | 6.1 | 5 | [measured] | | Parakeet loaded in both final workers: ready | 8.7 | 7 | [measured] | | run | status | container start s | image pull s | model load s | total s | first partial s | | --- | --- | --- | --- | --- | --- | --- | | local cold disk run 1 | [measured] | 0 | 0 | 8.7 | 8.7 | 0.91 | | local cold disk run 2 | [measured] | 0 | 0 | 8 | 8 | 0.9 | | local warm page cache run 1 | [measured] | 0 | 0 | 6.2 | 6.2 | 0.9 | | local warm page cache run 2 | [measured] | 0 | 0 | 6.2 | 6.2 | 0.9 | | Cloudflare container first caller (low) | [modelled] | 1 | 1 | 8 | 10 | 0.95 | | Cloudflare container first caller (high) | [modelled] | 3 | 8 | 8.7 | 19.7 | 0.95 | ### Keeping warm, and what it costs There is no "minimum instances" setting in the pages read. An instance stays awake while an open WebSocket keeps its Durable Object active, with an inactivity timeout of up to six hours, or with a periodic touch from a cron Worker. Because CPU is billed on active use only, an idle 4 vCPU / 8 GiB container costs only the provisioned memory and disk: **about $56 a month** (about $83 for the preset 12 GiB size) plus about $4 for the Durable Object that fronts it [estimate]. Caveat: the pricing page does not define "active"; if a container's whole running time were billed on its vCPUs, the always-warm fleet would cost about three times more. The first invoice of a test settles it. ## Real-time fit: size, routing, limits | Question | Answer | Status | | --- | --- | --- | | Does our 24-core layout fit? | No. The reference layout is 24 worker processes (18 fast, 6 final) on 24 vCPUs and about 20 GB, carrying 28 streams cleanly on Graviton4 (first partial 1.0 s, final 1.1 s). A container is at most 4 vCPU, so the design becomes six containers of 3 fast and 1 final worker. Memory is not the limit (3.5 to 5 GB per container, 8 GiB is enough); cores are. | [measured] layout and capacity | | Streams per container | Graviton4 carries 1.17 streams per vCPU at the knee, AMD c7a 0.83, Intel c7i 0.50. Cloudflare is amd64 only and does not say what its vCPU is, so a 4 vCPU container carries about 1.7 to 2.8 streams after our 0.85 derate: plan on 2. Six containers carry 10 to 17 streams, not 28. | [measured] on EC2, [estimate] for Cloudflare | | Session affinity | A stream is one WebSocket that stays on one container for life (decoder state, voice-activity state, the open utterance). Affinity is by Durable Object id; the routing layer that picks a container for a new caller is ours to write. | [sourced] design | | Burst of new callers | There is no autoscaling, and each new container pays the full cold start for two or three streams. The platform can start thousands of small containers quickly; our 2 GB image and model load are the slow part. | [estimate] | | WebSocket limits and reconnects | No maximum duration is documented; the idle timeout is unpublished, so clients ping every 20 to 30 s. Connections are not durable (a release of the network can restart servers), and the service has no resume: clients keep a ring buffer and resend the last seconds after reconnecting. | [sourced] | | Edge hop | The client reaches Cloudflare's edge in 21 to 59 ms here (TCP connect, three samples). The extra Worker, Durable Object and container legs are not measured; the object and container may be in different places. We estimate 10 to 60 ms each way, 20 to 120 ms in all, 2 to 13% of a 0.95 s first partial. | [measured] to the edge, [estimate] beyond | | Long connections against batch | Live: a Worker bills no duration; the Durable Object in front of a container is a fixed few dollars a month, shared by its streams; memory and disk are billed all the time the container is awake, CPU only for the audio decoded. Batch: the container is awake only while it works. | [sourced] prices | ### Streams per instance, capacity curves and latency Measured on EC2 (the left chart's first three bars and the capacity curves), against an assumed Cloudflare container. A server is full at the knee, where the lag of the finals starts to climb; the planning value keeps 15% back. *Chart: Live streams carried by 4 vCPUs. Measured streams per vCPU at the knee on EC2, times four, and the planning value after the 0.85 derate. The Cloudflare container is an assumption: its vCPU is not documented. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Streams per server, measured on EC2. p90 lag of each final behind the speech it covers, against simultaneous English streams, on 24 vCPUs (c8g, c7a) or 12 (c7i); a fresh service for every point. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Final lag against load. Median lag of each final behind the speech it covers, with the band up to the maximum. Each stream plays 60 s of real-time speech. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Latency of one live stream. Medians over 25 clips (20 on the Mac), endpointing 300 ms. The final includes the 0.3 s of silence that ends the utterance. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Time to first partial: direct against through the Cloudflare edge. The service's measured 0.95 s, plus the extra network legs of a Cloudflare route (estimate: 10 to 60 ms each way). The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* | path | status | service first partial s | extra path s | total s | note | | --- | --- | --- | --- | --- | --- | | direct to the service | [measured] | 0.95 | 0 | 0.95 | median first partial after speech starts | | through the Cloudflare edge: low | [modelled] | 0.95 | 0.02 | 0.97 | 10 ms each way | | through the Cloudflare edge: high | [modelled] | 0.95 | 0.12 | 1.07 | 60 ms each way | ## Cost model The model is `docs/data/costs.py` with the prices and assumptions in `docs/data/costs.csv`; every row carries its status, source and the date it was read (table at the end of this section). Cloudflare is modelled as 4 vCPU / 8 GiB containers carrying two streams, CPU billed on active use, the included allowances applied, a Durable Object per container and the $5 Workers plan. Operations hours are left out of every column. *Chart: Cost of one busy live stream for an hour. US dollars per stream-hour with every channel busy. Cloudflare is a model (capacity not measured there); the EC2 capacities are measured. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Monthly cost against monthly minutes, with break-even points: traffic round the clock. Live streaming, infrastructure only, no operations hours. Dashed lines: the volume at which an option first costs less than Deepgram pay-as-you-go. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Monthly cost against monthly minutes, with break-even points: traffic in business hours only. The same options when the load is weekdays 10 hours: an always-on fleet idles most of the month, so it breaks even later. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* | traffic | option | cheaper than | minutes per month | status | | --- | --- | --- | --- | --- | | roundclock | Cloudflare containers (scale to zero) | deepgram | 2100 | [modelled] | | roundclock | Cloudflare containers (always warm) | deepgram | 37700 | [modelled] | | roundclock | EC2 Graviton4 on-demand | deepgram | 59700 | [modelled] | | roundclock | EC2 Graviton4 1-year plan | deepgram | 44800 | [modelled] | | roundclock | Own desktops | deepgram | 10600 | [modelled] | | roundclock | EC2 Graviton4 on-demand | cf_scale_to_zero | 94600 | [modelled] | | roundclock | EC2 Graviton4 on-demand | cf_always_warm | 106200 | [modelled] | | business | Cloudflare containers (scale to zero) | deepgram | 2100 | [modelled] | | business | Cloudflare containers (always warm) | deepgram | never under 31M | [modelled] | | business | EC2 Graviton4 on-demand | deepgram | 112500 | [modelled] | | business | EC2 Graviton4 1-year plan | deepgram | 44800 | [modelled] | | business | Own desktops | deepgram | 10600 | [modelled] | | business | EC2 Graviton4 on-demand | cf_scale_to_zero | never under 31M | [modelled] | | business | EC2 Graviton4 on-demand | cf_always_warm | 71000 | [modelled] | | Minutes/month | Peak streams | Deepgram PAYG | Workers AI Nova-3 WS | Cloudflare Containers always-warm | Cloudflare Containers scale-to-zero | EC2 c8g on-demand | EC2 c8g 1-yr SP | i9 desktop class (amortised) | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | 10,000 | 0.3 | $48.0 | $92.0 | $138 (2x) | $32.0 (up to 1x) | $275 (2x xlarge) | $209 (2x xlarge) | $48.2 (1x) | | 100,000 | 3.4 | $480 | $920 | $268 (2x) | $296 (up to 2x) | $277 (2x xlarge) | $211 (2x xlarge) | $48.2 (1x) | | 1,000,000 | 34 | $4,800 | $9,200 | $2,530 (18x) | $2,970 (up to 18x) | $1,239 (5x 2xlarge) | $909 (5x 2xlarge) | $241 (5x) | | 10,000,000 | 342 | $48,000 (over concurrency limit) | $92,000 | $24,789 (172x) | $29,709 (up to 172x) | $11,849 (49x 2xlarge) | $8,619 (49x 2xlarge) | $2,074 (43x) | | Minutes/month | Peak streams | Deepgram PAYG | Workers AI Nova-3 WS | Cloudflare Containers always-warm | Cloudflare Containers scale-to-zero | EC2 c8g on-demand | EC2 c8g 1-yr SP | i9 desktop class (amortised) | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | 10,000 | 1.1 | $48.0 | $92.0 | $138 (2x) | $32.0 (up to 1x) | $275 (2x xlarge) | $209 (2x xlarge) | $48.2 (1x) | | 100,000 | 11 | $480 | $920 | $510 (6x) | $296 (up to 6x) | $510 (2x 2xlarge) | $378 (2x 2xlarge) | $96.5 (2x) | | 1,000,000 | 114 | $4,800 | $9,200 | $4,884 (57x) | $2,970 (up to 57x) | $4,082 (17x 2xlarge) | $2,961 (17x 2xlarge) | $724 (15x) | | 10,000,000 | 1136 | $48,000 (over concurrency limit) | $92,000 | $48,746 (569x) | $29,709 (up to 569x) | $38,856 (163x 2xlarge) | $28,109 (163x 2xlarge) | $6,898 (143x) | | Option (pre-recorded audio) | $ per audio minute | $ per 1,000 audio minutes | Status of the number | | --- | --- | --- | --- | | Deepgram Nova-3 PAYG | $0.0043 | $4.30 | published | | Deepgram Nova-3 Growth | $0.0036 | $3.60 | published | | Deepgram Whisper Large | $0.0048 | $4.80 | published | | Amazon Transcribe batch | $0.006 | $6.00 | from AWS's own example; tiers not read | | Cloudflare Workers AI Whisper (large-v3-turbo) | $0.0005 | $0.50 | published; audio leaves our machines | | Our service on Lambda, Parakeet, container image | $0.00159 | $1.59 | estimate from our CPU numbers; no cold-start or idle cost | | Our service on c8g.4xlarge on-demand, queue, 90% busy | $0.00043 | $0.43 | estimate | | Our service on a Cloudflare container (4 vCPU / 8 GiB, scale-to-zero, queue) | $0.00065 | $0.65 | estimate; amd64 only, vCPU speed not stated, needs the proof | | Same on spot | $0.00023 | $0.23 | estimate; spot price is third party | Reading it: scale-to-zero containers are cheaper than Deepgram at any volume shown and cheaper than EC2 Graviton below about 95,000 minutes a month on round-the-clock traffic; always-warm containers undercut Deepgram from about 38,000 minutes round the clock but never on business-hours traffic; Graviton on a 1-year plan undercuts Deepgram from about 45,000; and at volume containers cost about twice EC2 Graviton and five to fifteen times our own hardware. All of this assumes capacity we have **not measured on Cloudflare**. Every Cloudflare price, limit and assumption in the model, with status, source and date read `docs/data/costs.csv` | item | value | unit | status | source | date read | | --- | --- | --- | --- | --- | --- | | cf_wai_whisper_min | 0.0005 | USD per audio minute | verified | https://developers.cloudflare.com/workers-ai/platform/pricing/ (dateModified 2026-11-18) | 2026-12-04 | | cf_wai_nova3_min | 0.0052 | USD per audio minute | verified | https://developers.cloudflare.com/workers-ai/platform/pricing/ | 2026-12-04 | | cf_wai_nova3_ws_min | 0.0092 | USD per audio minute | verified | https://developers.cloudflare.com/workers-ai/platform/pricing/ | 2026-12-04 | | cf_wai_flux_ws_min | 0.0077 | USD per audio minute | verified | https://developers.cloudflare.com/workers-ai/platform/pricing/ | 2026-12-04 | | cf_wai_aura2_1k | 0.03 | USD per 1000 characters | verified | https://developers.cloudflare.com/workers-ai/platform/pricing/ | 2026-12-04 | | cf_wai_melotts_min | 0.0002 | USD per audio minute | verified | https://developers.cloudflare.com/workers-ai/platform/pricing/ | 2026-12-04 | | cf_wai_neuron_1k | 0.011 | USD per 1000 neurons | verified | https://developers.cloudflare.com/workers-ai/platform/pricing/ | 2026-12-04 | | cf_workers_paid_month | 5 | USD per month | verified | https://developers.cloudflare.com/workers/platform/pricing/ | 2026-12-03 | | cf_container_vcpu_s | 0.00002 | USD per vCPU-second | verified | https://developers.cloudflare.com/containers/platform/pricing/ (dateModified 2026-11-13; billed on active CPU) | 2026-12-04 | | cf_container_gib_s | 0.0000025 | USD per GiB-second | verified | https://developers.cloudflare.com/containers/platform/pricing/ (provisioned memory) | 2026-12-04 | | cf_container_standard4_vcpu | 4 | vCPU | verified | https://developers.cloudflare.com/containers/platform/limits/ | 2026-12-04 | | cf_container_standard4_gib | 12 | GiB | verified | https://developers.cloudflare.com/containers/platform/limits/ | 2026-12-04 | | cf_container_egress_gb | 0.025 | USD per GB | verified | https://developers.cloudflare.com/containers/platform/pricing/ (North America and Europe; 1 TB included) | 2026-12-04 | | cf_do_request_million | 0.15 | USD per million | verified | https://developers.cloudflare.com/durable-objects/platform/pricing/ | 2026-12-04 | | cf_do_gb_s_million | 12.5 | USD per million GB-seconds | verified | https://developers.cloudflare.com/durable-objects/platform/pricing/ | 2026-12-04 | | cf_r2_gb_month | 0.015 | USD per GB-month | verified | https://developers.cloudflare.com/r2/pricing/ | 2026-12-04 | | cf_tunnel_month | 0 | USD per month | [modelled] | Tunnel docs say available on all plans; no pricing page was read | 2026-12-04 | | cf_container_disk_gb_s | 7e-8 | USD per GB-second | verified | https://developers.cloudflare.com/containers/platform/pricing/ (dateModified 2026-11-13; provisioned disk) | 2026-12-05 | | cf_container_incl_gib_h | 25 | GiB-hours per month | verified | https://developers.cloudflare.com/containers/platform/pricing/ | 2026-12-05 | | cf_container_incl_vcpu_min | 375 | vCPU-minutes per month | verified | https://developers.cloudflare.com/containers/platform/pricing/ | 2026-12-05 | | cf_container_incl_disk_gb_h | 200 | GB-hours per month | verified | https://developers.cloudflare.com/containers/platform/pricing/ | 2026-12-05 | | cf_do_incl_gb_s | 400000 | GB-seconds per month | verified | https://developers.cloudflare.com/durable-objects/platform/pricing/ (dateModified 2026-11-13) | 2026-12-05 | | cf_lb_month | 5 | USD per month | [modelled] | https://www.cloudflare.com/plans/network-cdn.md (Starting at $5/mo; per-origin and per-request prices not found) | 2026-12-05 | | cf_container_custom_gib | 8 | GiB | [assumption] | custom instance sizes are allowed within the account limits (https://developers.cloudflare.com/containers/platform/limits/) | 2026-12-05 | | cf_container_ref_type | c7a.2xlarge | instance type | [assumption] | Cloudflare does not state the vCPU model or speed (amd64 only); we plan with the measured AMD c7a figure per vCPU | 2026-12-05 | | cf_streams_per_container | 2 | streams | [assumption] | floor(4 vCPU x 0.83 measured streams per vCPU x 0.85 derate) = 2 on c7a-like vCPUs; 1 on c7i-like | 2026-12-05 | | cf_fill | 0.5 | fraction | [assumption] | average fill of the containers that are awake under scale-to-zero (streams are not packed perfectly) | 2026-12-05 | | cf_session_min | 5 | minutes | [assumption] | average call length | 2026-12-05 | | cf_wake_fraction | 0.1 | fraction | [assumption] | share of sessions that arrive at a sleeping container and wake it | 2026-12-05 | | cf_sleep_after_min | 2 | minutes | [assumption] | inactivity timeout kept as a tail after the last session (the docs example uses 2 minutes) | 2026-12-05 | | cf_cold_start_local_s | 8 | seconds | [measured] | local test instance on i9-14900K desktop efficiency cores 16-22 2026-12-05 with the model files evicted from the page cache (8.0 and 8.7 s; 6.2 s with a warm cache): process start to /health 200 (docs/CLOUDFLARE-SERVERLESS.md) | 2026-12-05 | | hy_hour_peak | 1.25 | factor | [assumption] | peak concurrency inside an hour against the hour's mean (capacity must cover the peak; the earlier tables use 1.5 against a window average) | 2026-12-05 | | hy_warm_lead_cf_min | 0.5 | minutes | [assumption] | pre-emptive start of a Cloudflare container until health check and test transcript pass (docs: 1-3 s container start; 8 s model load measured; image pull unmeasured: this is optimistic) | 2026-12-05 | | hy_warm_lead_ec2_min | 2 | minutes | [assumption] | EC2 launch from a pre-baked AMI in an Auto Scaling group until the same checks pass (launch 60-90 s plus 8 s model load) | 2026-12-05 | | hy_drain_min | 2 | minutes | [assumption] | time a burst instance stays after its last session before it is released (the hysteresis against flapping) | 2026-12-05 | | hy_burst_fill | 0.7 | fraction | [assumption] | fill of burst instances that were started on purpose (sessions are steered to them) | 2026-12-05 | | hy_base_threshold | 0.65 | fraction | [assumption] | base utilisation at which the router starts warming burst capacity | 2026-12-05 | | hy_spot_discount_note | 0 | n/a | [assumption] | c8g spot price per vCPU is taken from c8g.4xlarge ($0.349 an hour; third-party Vantage figure) and scaled linearly to c8g.xlarge | 2026-12-05 | | hy_handoff_replay_cpu_s_per_audio_s | 0.59 | cpu-s per audio-s | [measured] | same as the streaming cost: a replay is decoded like live audio | 2026-12-05 | | hy_min_base_share | 0.25 | fraction | [assumption] | with a Cloudflare or spot burst tier the base always carries at least this share of the peak (spot and warm-up capacity cannot be trusted to be the whole fleet: spot pools run dry and give 2 minutes notice) | 2026-12-05 | ## Base plus burst: an always-on server in front, serverless behind it The idea: an always-on base, our own machines or EC2, takes the traffic. When it passes a utilisation threshold (65% here) a serverless tier is warmed in advance; new sessions go to it only after a health check and a test transcript; it is drained and released after the burst. **New sessions are routed; live ones are never moved.** A call that finds everything full falls back to a hosted provider, which our clients already support. It is the only way serverless makes sense for live audio, because the cold start is hidden behind capacity that is already running. ```mermaid flowchart TB %% title: Base plus burst: new calls go to the always-on base first, to warm burst capacity second and to a hosted provider last CALL[Callers and clients] --> EDGE[Cloudflare edge: hostname, TLS, rate limit] EDGE --> ROUTE{Router: pools in order} ROUTE -->|1. below 65%| BASE[Base pool, always on] ROUTE -->|2. when READY| BURST[Burst pool, warm] ROUTE -.-> WATCH[Warm-up controller: reads sessions and capacity] ROUTE --> HOSTED[3. Hosted provider, when all is full] WATCH -.->|start, test, mark READY| BURST ``` ```mermaid sequenceDiagram %% title: A burst instance is started before it is needed, tested, and only then given calls; a call that finds everything full goes to the hosted provider participant K as Client participant R as Router participant B as Base participant W as Controller participant S as Burst instance K->>R: open stream R->>B: base at 58%: use the base Note over B: base reaches 65% W->>S: start two instances now Note over S: load models, about 8 s W->>S: health check, then test clip S-->>W: 200 and the expected text W->>R: mark ready K->>R: open stream (base at 90%) R->>S: new call goes to the burst instance K->>R: open stream (everything full) R-->>K: 503 CAPACITY: use the hosted provider Note over S: idle 2 min: drained, released ``` ### Readiness gate and warm-up arithmetic Instance up is not ready. The controller waits for the health check (the service answers healthy only after every worker has loaded) and then streams a 6.5-second sample and compares the text. Only then does the router see the instance. Warm-up must finish before the base fills: the base can take (1 minus the threshold) times its capacity while the burst tier warms, so the arrival rate it can absorb is that headroom divided by the warm-up time. For a 28-stream base at 65%, about 10 streams of headroom: a 20-second warm-up covers about 30 new sessions a minute, a 2-minute EC2 launch about 5 a minute [estimate]. A working day's ramp fits both; **a flash crowd fits neither, and that is what the hosted provider is for.** ### The warm pool over a campaign day A simulated day [estimate]: a base of 24 streams, a campaign from 13:00 that roughly quadruples the load, and a six-minute flash crowd at 14:30. The controller warms burst instances when the forecast passes 65% of the base; they take calls two minutes later and are released when the load no longer needs them. The numbers are a fluid model (`docs/data/burst_sim.py`), not a measurement. *Illustration: Interactive animation of the modelled campaign day. On the left, callers arrive as moving dots. A base server of 24 stream slots (six units of four) fills with amber light as demand rises. When the forecast passes 65% of the base, burst instances appear on the right with a green warm-up bar that fills over two minutes; once ready they light blue and take new sessions. During the flash crowd at 14:30 (peak about 70 streams) the hosted-provider cloud at the top right lights red with the streams nothing else could take. After the campaign the instances drain and disappear. Readouts show the simulated clock, streams wanted, served on the base, on burst instances and by the hosted provider, instances ready and starting, and base utilisation. Over the charted day: 53.7 stream-hours on burst instances and 0.6 on the hosted provider.* *Chart: Where each call is served during a campaign day. Simulated: a base of 24 streams, burst instances warmed at 65% and ready after 2 minutes, a hosted provider for the rest. Streams over time, 11:00 to 18:00. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Base utilisation and the burst pool warming. Percent of the base's 24 streams in use (left) triggers warm-up at 65%; the lower chart counts burst instances starting and ready. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Burst instances over the same day. Instances starting (not yet given calls) and ready. They are started ahead of the need and released after 2 idle minutes. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* | | Cloudflare Load Balancing and Tunnel | A Worker with a Durable Object registry | | --- | --- | --- | | How it picks | Pools in order, base first; a monitor on a readiness URL makes the base "unhealthy" for new sessions above the threshold, so the next pool gets them | The Worker asks a registry (open sessions and readiness per backend) and proxies the WebSocket to the chosen backend | | Open streams when a pool flips | Not terminated, per Cloudflare's documentation [sourced] | Under our control | | Reaction time | Monitor interval, retries and up/down counts: 30 to 120 s [estimate] | Seconds, if the Worker reads each backend's health itself | | Cost | From $5 a month plus Tunnel (price not stated) | $5 Workers plan plus about $4 for an awake registry object | | Needs | A small service change: a readiness URL that fails above a configurable utilisation | Our proxy code in the audio path | Recommended: Load Balancing pools for the data path (no code of ours in the audio path) and a small cron Worker for the warm-up controller; move to the Worker router only if the monitor interval proves too slow. ### Can a live stream be handed off mid-call? Measured A stream carries decoder state and the service has no resume, so we tested what a handoff costs: three LibriSpeech clips (10.4, 3.3 and 6.6 s) with pauses, a second fresh session standing in for the new backend, compared with the same audio in one session [measured], one machine, no network in the path. | scenario | replay audio s | replay speed | words differing pct | final lag s | baseline final lag s | | --- | --- | --- | --- | --- | --- | | at a pause after the final: no replay | 0 | n/a | 0 | 0.57 | 0.58 | | at a pause: replay of the last 1 s | 1 | 2 | 0 | 0.56 | 0.58 | | at a pause: replay of the last 3 s | 3 | 2 | 0 | 0.56 | 0.58 | | mid-utterance (5 s into 10.4 s): replay from utterance start at 2x | 5 | 2 | 0 | 2.1 | 2.15 | | mid-utterance: replay from utterance start at 4x | 5 | 4 | 0 | 2.13 | 2.15 | | mid-utterance: no replay | 0 | n/a | 25.9 | n/a | 2.15 | - **At a pause a handoff is free:** after a final and a short silence there is nothing to rebuild; the new backend can start with no replay. - **Mid-sentence it works if the proxy replays the open utterance:** the model state rebuilds from the audio and the result was identical, with the final on time. The glitch is a 1.25 to 2.5 second stall while the audio so far is replayed at 2 to 4 times real time, and about 3 CPU-seconds for 5 s of audio. Keep the replay at 2x or below on a shared host. - **Without replay,** 25.9% of the words of the sentence were lost. - Someone has to hold the audio since the last final (a ring buffer of at most one utterance), offset the new session's timestamps and drop duplicate finals. That proxy does not exist yet, so the first version routes new sessions only; handoff becomes worth building for drain-and-deploy and for spot interruptions (two minutes' notice). ### Cost: a base for the normal load against sizing for the peak Base: Graviton4 units of 4 vCPU (about 4 streams each, measured), always on, at least two, behind the Cloudflare front door. Traffic shapes: business hours, round the clock, and business hours plus four three-hour campaigns at four times the load. The size of the base is the cheapest for each case; warm-up waste is included [estimate]. *Chart: Base plus burst against sizing for the peak: one million minutes a month. US dollars per month, infrastructure only, by traffic shape. The base is sized for the normal load; the burst tier takes the rest. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* | Traffic | Minutes/month | Peak streams | All on Deepgram PAYG | EC2 c8g sized for the peak, always on | Base + Deepgram overflow | Base + Cloudflare containers burst | Base + EC2 spot burst | Own machines base + Deepgram overflow | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | business hours | 100,000 | 11 | $480 | $366 (3x) | $323 (base 2x, burst 24%) | $289 (base 2x, burst 15%) | $254 (base 2x, burst 3%) | $101 (own base 2x) | | business hours | 1,000,000 | 109 | $4,800 | $3,378 (28x) | $3,147 (base 22x, burst 16%) | $2,334 (base 7x, burst 64%) | $1,179 (base 7x, burst 28%) | $680 (own base 14x) | | business hours | 10,000,000 | 1089 | $48,000 | $33,129 (275x) | $31,429 (base 220x, burst 16%) | $23,225 (base 69x, burst 64%) | $11,646 (base 69x, burst 29%) | $6,586 (own base 136x) | | round the clock | 100,000 | 4 | $480 | $246 (2x) | $246 (base 2x, burst 0%) | $246 (base 2x, burst 0%) | $246 (base 2x, burst 0%) | $101 (own base 2x) | | round the clock | 1,000,000 | 44 | $4,800 | $1,450 (12x) | $1,340 (base 11x, burst 1%) | $1,261 (base 9x, burst 14%) | $674 (base 3x, burst 46%) | $294 (own base 6x) | | round the clock | 10,000,000 | 445 | $48,000 | $13,616 (113x) | $13,241 (base 107x, burst 3%) | $12,519 (base 92x, burst 11%) | $6,648 (base 29x, burst 47%) | $2,692 (own base 55x) | | business hours plus 4 campaign days | 100,000 | 37 | $480 | $1,209 (10x) | $349 (base 2x, burst 29%) | $407 (base 3x, burst 10%) | $376 (base 3x, burst 2%) | $158 (own base 2x) | | business hours plus 4 campaign days | 1,000,000 | 366 | $4,800 | $11,207 (93x) | $3,421 (base 18x, burst 36%) | $3,278 (base 24x, burst 12%) | $2,986 (base 24x, burst 3%) | $1,330 (own base 12x) | | business hours plus 4 campaign days | 10,000,000 | 3660 | $48,000 | $111,180 (923x) | $34,082 (base 184x, burst 35%) | $31,656 (base 231x, burst 12%) | $28,745 (base 231x, burst 3%) | $13,127 (own base 115x) | | Traffic | Base + Deepgram overflow beats all-Deepgram from | Base + Cloudflare burst from | Base + EC2 spot burst from | Peak-sized always-on EC2 from | | --- | --- | --- | --- | --- | | business hours | 51k | 52k | 51k | 51k | | round the clock | 51k | 51k | 51k | 51k | | business hours plus campaign days | 59k | 56k | 52k | never (under 30M) | - The saving depends on how spiky the traffic is: steady traffic gains little (round the clock, $1,450 against $1,261 to $1,340 at a million minutes); campaign traffic falls from $11,207 for a fleet sized for the peak to about $3,000 to $3,400, about 70% less. - The cost curve is flat around the optimum (a base of 2, 5, 10 or 20 units costs within 25% of each other at a million business-hour minutes): choose the base for resilience and ramp speed, not the last dollar. - Hosted overflow needs no warm-up and no router state, but pay-as-you-go caps live streams at 150; a campaign peak of hundreds needs a contract. Own machines as the base are the cheapest base of all. | Burst tier | Warm-up to hide | Per busy stream-hour | Fit | | --- | --- | --- | --- | | Hosted provider (Deepgram) | none | $0.288 [sourced] | Best first overflow, already in the clients; concurrency caps; audio leaves our network | | EC2 Auto Scaling group, spot | about 1.5 to 2 min [assumption] | about $0.031 [estimate] | Cheapest burst tier at volume; spot gives two minutes' notice before it reclaims an instance ([AWS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-instance-termination-notices.html)); warm pools do not support Spot in mixed groups ([AWS](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html)) | | EC2 on-demand group | same | about $0.057 [estimate] | Can use a warm pool of stopped instances (pay only for the disks) | | Cloudflare Containers | 10 to 20 s [estimate] | about $0.163 [estimate] | Acceptable as a small pool; 4 vCPU per container; no autoscaling; beta | ## Scenarios and what-ifs [modelled] **Everything in this section is theory.** These charts are produced by scripts from stated assumptions; none of the dashed lines or hatched bars is a measurement. Each chart lists its assumptions under it and links the script, which is in the repository and downloadable here: [`scenarios.py`](https://speech.unidatum.com/data/scenarios.py), [`burst_sim.py`](https://speech.unidatum.com/data/burst_sim.py), [`costs.py`](https://speech.unidatum.com/data/costs.py). Change an assumption, re-run (`python3 docs/data/scenarios.py`), rebuild the site, and the charts redraw. ### Cold start under different assumptions The one measured number is the local start (8.7 s). Everything on Cloudflare depends on how long an image pull takes, which Cloudflare does not document, and on how the service loads its models. Modelled: **9.7 s** if the host already has the image, **15.7 s** if a 2 GB image is pulled at 400 MB/s, **31.7 s** at 100 MB/s. Loading Whisper and Parakeet in parallel saves about 2.6 s; serving the English route first (Parakeet only) saves about 4.1 s. So the cheapest improvement is in our own start-up code, not in the platform. *Chart: Cold-start timelines under different assumptions. Share of the models a stream needs that are loaded, against seconds since the caller arrived. Solid: measured locally. Dashed: modelled for a Cloudflare container. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Time until a caller can be served, by scenario. Platform overhead (container start and image pull) plus model loading. Hatched bars are modelled. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* | scenario | platform overhead s | loading s | ready s | basis | | --- | --- | --- | --- | --- | | Local service, measured | 0 | 8.7 | 8.7 | [measured] | | Cloudflare, image already on the host (start 1 s) | 1 | 8.7 | 9.7 | [modelled] | | Cloudflare, start 2 s + pull 2 GB at 400 MB/s | 7 | 8.7 | 15.7 | [modelled] | | Cloudflare, start 3 s + pull 2 GB at 100 MB/s | 23 | 8.7 | 31.7 | [modelled] | | As the 400 MB/s case, Whisper and Parakeet loaded in parallel | 7 | 6.1 | 13.1 | [modelled] | | As the 400 MB/s case, English route only (Parakeet, no Whisper) | 7 | 4.6 | 11.6 | [modelled] | ### Burst response: a sudden step of 20 streams What happens in the first five minutes if 20 streams arrive at once while the base is full: the hosted provider catches what no warm instance can take. The slower the controller notices (a Load Balancing monitor takes about 60 s) and the slower the warm-up (a Cloudflare container 20 s, an EC2 spot instance 120 s, both assumed), the longer the spill. Modelled spill in the first five minutes: **8 stream-minutes** with a Worker router and containers, **60** with a monitor and spot instances, **17** if three instances were already warm. At Deepgram's $0.0048 a minute that is 4 cents to 29 cents per step: **a slow burst tier costs little money when a hosted overflow exists; what it costs is dependence on that overflow**. *Chart: Burst response: streams spilling to the hosted provider after a sudden step. 20 extra streams arrive at t=0 while the base is full. Lines show streams that no warm instance can take yet. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* | scenario | reaction delay s | warm up s | spill stream minutes in 5 min | spill cost usd | basis | | --- | --- | --- | --- | --- | --- | | Worker router, Cloudflare container (2 streams each), warm-up 20 s | 5 | 20 | 8.3 | 0.04 | [modelled] | | Load Balancing monitor, Cloudflare container, warm-up 20 s | 60 | 20 | 26.7 | 0.128 | [modelled] | | Worker router, EC2 spot instance (4 streams each), warm-up 120 s | 5 | 120 | 41.7 | 0.2 | [modelled] | | Load Balancing monitor, EC2 spot, warm-up 120 s | 60 | 120 | 60 | 0.288 | [modelled] | | Pre-warmed: threshold crossed earlier, 3 spot instances already ready | 5 | 120 | 16.7 | 0.08 | [modelled] | ### Warm pool and base plus burst over a simulated day The campaign-day charts in the section above show one run. Here the same simulation is varied. **Lead time only matters when the load ramps fast:** with a 5-minute ramp a 10-minute warm-up spills about 2.2 stream-hours to the hosted provider in the day; with a 20-minute ramp about 0.2; with an hour's ramp nothing. **A lower threshold helps only when the warm-up is slow** (40 to 50% instead of 65% cuts the spill by about a quarter at a 5-minute lead), at the price of more burst instance-hours. **The base size is a resilience decision, not a cost one:** in the model the cheapest base is the smallest (about $15 a day for 12 streams against $25 for 24 and $61 for 64) because burst capacity covers the campaign, but that assumes the burst tier is ready on time. *Chart: Warm-up lead time against how fast the load ramps. Hosted-provider stream-hours over the simulated day (calls that found no capacity), warm-up at 65% of the base, by the length of the campaign ramp. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Warm-up threshold against lead time, for a fast ramp. Hosted-provider stream-hours over the simulated day with a 5-minute campaign ramp, by the base utilisation at which warm-up starts. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: How big should the always-on base be? Cost of the simulated day by base size. Day cost = base on-demand + burst instances + hosted overflow, for bases of 12 to 64 streams. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* ### Cost across volumes if the Cloudflare vCPU were different The biggest unknown is the speed of a Cloudflare vCPU. If it is like an Intel c7i (0.5 streams per vCPU), always-warm containers cost about as much as Deepgram at a million minutes a month (about $4,500 against $4,800). If it is like an AMD c7a, about $2,500. If it were Graviton4-class (it is not on offer: Cloudflare is amd64 only), about $1,750, still above EC2 Graviton4's $1,240. A vCPU twice as fast as c7a gets to about $1,150. And if "active CPU" billing turned out to mean the whole running time, the AMD-like always-warm figure roughly doubles, to about $4,900. *Chart: Cloudflare always-warm cost if the vCPU were slower or faster. Monthly cost against monthly minutes, traffic round the clock. How fast a Cloudflare vCPU is decides whether containers beat Deepgram and EC2. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Cloudflare scale-to-zero cost if the vCPU were slower or faster. The same what-if for containers that sleep between calls (50% fill, 2-minute tail). The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* ### Capacity as clock speed or core count changes Measured knees on 24 vCPUs: 28 streams on Graviton4 (2.7 GHz), about 20 on AMD c7a (3.5 GHz) and 12 on Intel c7i (3.2 GHz, scaled from a smaller run). Fitting a straight proportionality to clock speed times per-clock work through each point gives what faster or slower silicon would do: **at 4.5 GHz, about 47, 26 and 17 streams.** More cores help linearly up to the 24 we measured; beyond that the model assumes each doubling loses 8% to the shared final-pass pool, which is a guess: a 96-vCPU Graviton4 would carry about 94, not 112. Nothing here is measured away from the measured points. *Chart: What if the clock speed changed? Streams on a 24 vCPU server. Modelled lines through the measured point of each CPU family (dots): streams at the knee against all-core clock speed, 24 vCPUs. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: What if the core count changed? Streams against vCPUs. Modelled at each family's own clock: linear to 24 vCPUs (where we measured), then 8% lost per doubling to the shared final-pass pool (an assumption). The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* ### Re-running the scenarios Three scripts in `docs/data/` (Python 3, no dependencies) write the CSVs that these charts read: - `python3 docs/data/costs.py`: the cost model, the break-even points and the cost curves (reads `costs.csv` and `instances.csv`, where each price carries its source and date). - `python3 docs/data/burst_sim.py`: the campaign-day warm-pool simulation (and the functions the grid below uses). - `python3 docs/data/scenarios.py`: cold-start timelines, burst response, the threshold, lead and base-size grid, the vCPU cost what-ifs and the clock and core what-ifs. The assumptions are the constants at the top of the file. The data files are served under [/data/](https://speech.unidatum.com/data/) and the scripts next to them. | study | threshold pct | lead min | ramp min | base units | hosted stream hours | burst instance hours | instance starts | day cost usd | basis | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | threshold_lead_ramp | 40 | 1 | 5 | 6 | 0 | 26.6 | 8 | 25.29 | [modelled] | | threshold_lead_ramp | 50 | 1 | 5 | 6 | 0 | 25.5 | 8 | 25.19 | [modelled] | | threshold_lead_ramp | 65 | 1 | 5 | 6 | 0 | 23.7 | 8 | 25.04 | [modelled] | | threshold_lead_ramp | 80 | 1 | 5 | 6 | 0 | 23.7 | 8 | 25.04 | [modelled] | | threshold_lead_ramp | 90 | 1 | 5 | 6 | 0.01 | 23.6 | 8 | 25.04 | [modelled] | | threshold_lead_ramp | 40 | 2 | 5 | 6 | 0.03 | 26.8 | 9 | 25.31 | [modelled] | | threshold_lead_ramp | 50 | 2 | 5 | 6 | 0.03 | 25.6 | 9 | 25.22 | [modelled] | | threshold_lead_ramp | 65 | 2 | 5 | 6 | 0.04 | 23.8 | 9 | 25.06 | [modelled] | | threshold_lead_ramp | 80 | 2 | 5 | 6 | 0.04 | 23.8 | 9 | 25.06 | [modelled] | | threshold_lead_ramp | 90 | 2 | 5 | 6 | 0.11 | 23.8 | 9 | 25.08 | [modelled] | | threshold_lead_ramp | 40 | 5 | 5 | 6 | 0.55 | 27.8 | 15 | 25.56 | [modelled] | | threshold_lead_ramp | 50 | 5 | 5 | 6 | 0.55 | 26.6 | 14 | 25.45 | [modelled] | | threshold_lead_ramp | 65 | 5 | 5 | 6 | 0.76 | 24.7 | 14 | 25.34 | [modelled] | | threshold_lead_ramp | 80 | 5 | 5 | 6 | 0.76 | 24.7 | 14 | 25.34 | [modelled] | | threshold_lead_ramp | 90 | 5 | 5 | 6 | 0.76 | 24.7 | 14 | 25.34 | [modelled] | | threshold_lead_ramp | 40 | 10 | 5 | 6 | 1.67 | 30.3 | 21 | 26.09 | [modelled] | | threshold_lead_ramp | 50 | 10 | 5 | 6 | 1.67 | 29.2 | 21 | 26 | [modelled] | | threshold_lead_ramp | 65 | 10 | 5 | 6 | 2.21 | 27.2 | 21 | 25.98 | [modelled] | | threshold_lead_ramp | 80 | 10 | 5 | 6 | 2.21 | 27 | 20 | 25.97 | [modelled] | | threshold_lead_ramp | 90 | 10 | 5 | 6 | 2.21 | 27 | 20 | 25.97 | [modelled] | | threshold_lead_ramp | 40 | 1 | 20 | 6 | 0 | 24.8 | 7 | 25.14 | [modelled] | | threshold_lead_ramp | 50 | 1 | 20 | 6 | 0 | 23.7 | 7 | 25.04 | [modelled] | | threshold_lead_ramp | 65 | 1 | 20 | 6 | 0 | 21.8 | 7 | 24.87 | [modelled] | | threshold_lead_ramp | 80 | 1 | 20 | 6 | 0 | 21.7 | 7 | 24.87 | [modelled] | | threshold_lead_ramp | 90 | 1 | 20 | 6 | 0 | 21.7 | 7 | 24.86 | [modelled] | | threshold_lead_ramp | 40 | 2 | 20 | 6 | 0 | 25 | 8 | 25.15 | [modelled] | | threshold_lead_ramp | 50 | 2 | 20 | 6 | 0 | 23.9 | 8 | 25.05 | [modelled] | | threshold_lead_ramp | 65 | 2 | 20 | 6 | 0 | 22 | 8 | 24.89 | [modelled] | | threshold_lead_ramp | 80 | 2 | 20 | 6 | 0 | 21.9 | 8 | 24.88 | [modelled] | | threshold_lead_ramp | 90 | 2 | 20 | 6 | 0 | 21.9 | 8 | 24.88 | [modelled] | | threshold_lead_ramp | 40 | 5 | 20 | 6 | 0 | 25.6 | 10 | 25.2 | [modelled] | | threshold_lead_ramp | 50 | 5 | 20 | 6 | 0 | 24.3 | 9 | 25.09 | [modelled] | | threshold_lead_ramp | 65 | 5 | 20 | 6 | 0 | 22.4 | 9 | 24.93 | [modelled] | | threshold_lead_ramp | 80 | 5 | 20 | 6 | 0 | 22.3 | 9 | 24.92 | [modelled] | | threshold_lead_ramp | 90 | 5 | 20 | 6 | 0 | 22.3 | 9 | 24.92 | [modelled] | | threshold_lead_ramp | 40 | 10 | 20 | 6 | 0.07 | 26.4 | 11 | 25.29 | [modelled] | | threshold_lead_ramp | 50 | 10 | 20 | 6 | 0.07 | 25.2 | 11 | 25.19 | [modelled] | | threshold_lead_ramp | 65 | 10 | 20 | 6 | 0.2 | 23.2 | 11 | 25.05 | [modelled] | | threshold_lead_ramp | 80 | 10 | 20 | 6 | 0.26 | 23 | 10 | 25.05 | [modelled] | | threshold_lead_ramp | 90 | 10 | 20 | 6 | 0.26 | 23 | 10 | 25.05 | [modelled] | | threshold_lead_ramp | 40 | 1 | 60 | 6 | 0 | 20.2 | 7 | 24.74 | [modelled] | | threshold_lead_ramp | 50 | 1 | 60 | 6 | 0 | 19.1 | 7 | 24.63 | [modelled] | | threshold_lead_ramp | 65 | 1 | 60 | 6 | 0 | 17.1 | 7 | 24.46 | [modelled] | | threshold_lead_ramp | 80 | 1 | 60 | 6 | 0 | 16.9 | 7 | 24.44 | [modelled] | | threshold_lead_ramp | 90 | 1 | 60 | 6 | 0 | 16.7 | 7 | 24.43 | [modelled] | | threshold_lead_ramp | 40 | 2 | 60 | 6 | 0 | 20.4 | 7 | 24.75 | [modelled] | | threshold_lead_ramp | 50 | 2 | 60 | 6 | 0 | 19.2 | 7 | 24.64 | [modelled] | | threshold_lead_ramp | 65 | 2 | 60 | 6 | 0 | 17.2 | 7 | 24.47 | [modelled] | | threshold_lead_ramp | 80 | 2 | 60 | 6 | 0 | 17 | 7 | 24.45 | [modelled] | | threshold_lead_ramp | 90 | 2 | 60 | 6 | 0 | 16.8 | 7 | 24.44 | [modelled] | | threshold_lead_ramp | 40 | 5 | 60 | 6 | 0 | 20.8 | 8 | 24.79 | [modelled] | | threshold_lead_ramp | 50 | 5 | 60 | 6 | 0 | 19.5 | 7 | 24.68 | [modelled] | | threshold_lead_ramp | 65 | 5 | 60 | 6 | 0 | 17.5 | 7 | 24.5 | [modelled] | | threshold_lead_ramp | 80 | 5 | 60 | 6 | 0 | 17.3 | 7 | 24.48 | [modelled] | | threshold_lead_ramp | 90 | 5 | 60 | 6 | 0 | 17.1 | 7 | 24.47 | [modelled] | | threshold_lead_ramp | 40 | 10 | 60 | 6 | 0 | 21.7 | 9 | 24.86 | [modelled] | | threshold_lead_ramp | 50 | 10 | 60 | 6 | 0 | 20.5 | 9 | 24.76 | [modelled] | | threshold_lead_ramp | 65 | 10 | 60 | 6 | 0 | 18.4 | 9 | 24.57 | [modelled] | | threshold_lead_ramp | 80 | 10 | 60 | 6 | 0 | 18 | 8 | 24.54 | [modelled] | | threshold_lead_ramp | 90 | 10 | 60 | 6 | 0 | 17.9 | 8 | 24.53 | [modelled] | | base_size | 65 | 2 | 20 | 3 | 0.61 | 42.8 | 21 | 15.39 | [modelled] | | base_size | 65 | 2 | 20 | 4 | 0.61 | 33.6 | 20 | 18.42 | [modelled] | | base_size | 65 | 2 | 20 | 6 | 0.61 | 23.8 | 18 | 25.22 | [modelled] | | base_size | 65 | 2 | 20 | 8 | 0.61 | 16.7 | 16 | 32.26 | [modelled] | | base_size | 65 | 2 | 20 | 10 | 0.61 | 9.8 | 14 | 39.32 | [modelled] | | base_size | 65 | 2 | 20 | 12 | 0.61 | 5 | 11 | 46.55 | [modelled] | | base_size | 65 | 2 | 20 | 16 | 0.21 | 1.7 | 8 | 61.46 | [modelled] | ## The best Cloudflare-based deployment Cloudflare as the global edge in front of always-warm backends we control; Containers for batch, and as an optional small overflow pool. TLS ends at Cloudflare, so audio transits its network: fine for general traffic, a decision for sensitive customers, who can use the own-machine install directly. ```mermaid flowchart LR %% title: The best Cloudflare-based deployment: Cloudflare as the global edge in front of always-warm backends, containers for batch CALL[Callers] --> EDGE[Cloudflare edge] EDGE --> LB[Load Balancing and health checks] LB -->|Tunnel| OWN[Own machines] LB -->|Tunnel| EC2[EC2 Graviton4, always on] LB -.->|overflow, kept warm| BURST[Spot group or containers] UP[Upload to R2] --> Q[Queue] --> JOB[Batch container job] --> RES[Results in R2] ``` ### Recommendation by volume 1. **Under about 50,000 minutes a month:** a hosted provider alone, or our own machine. No hybrid. 2. **About 50,000 to a million:** own machines (or two small Graviton servers) as the base, Cloudflare edge and Tunnel in front, the hosted provider as overflow through the existing client fallback. The burst tier would be at most a quarter of the bill. 3. **Above a million, or with campaign peaks:** add an EC2 spot group as the second pool, warmed on a 65% threshold and a schedule, hosted provider last; keep a base of 25 to 50% of the peak. 4. **Cloudflare Containers as the burst tier** only if a test shows a short, repeatable warm-up and a vCPU at least as fast as the AMD c7a. 5. **Do not move live streams in the first version.** ## Drawbacks of serverless for live use, in order of importance 1. **Cold start on every wake-up**: about 10 to 20 seconds for us (8 s of model loading measured, plus container start and an unmeasured image pull). Unacceptable for a live caller; avoided only by keeping containers awake, which turns serverless into a provisioned fleet. 2. **No autoscaling and small boxes:** a burst means many cold starts of two- to three-stream containers, with a router we must write and run. 3. **4 vCPU and 12 GiB ceiling, amd64 only, vCPU unspecified:** our 24-core layout becomes six containers carrying 10 to 17 streams instead of 28, and the Graviton advantage is unavailable. 4. **Price per stream:** about twice Graviton EC2 in the monthly model and three times per busy stream-hour; still half of Deepgram at volume. 5. **Public beta**, with moving parts: the default scheduling policy is deprecated and the older container class is maintained only to the end of 2026. 6. **WebSocket reliability is under-documented:** no published idle timeout; servers can restart on a release; no resume for a stateful decoder, so clients need replay logic. 7. **The Durable Object and container may be in different places**, adding an unmeasured hop. 8. **Billing details are unclear in places:** what "active" CPU means, and how a proxied WebSocket's messages are counted. 9. **Audio leaves our network,** and Workers AI's Nova-3 and Flux are Deepgram's models, not ours. 10. **Prices not stated:** Tunnel and Access on any page read, and Load Balancing beyond "starting at $5 a month". ## Not yet measured No container has been run on Cloudflare yet; every Cloudflare figure above that is not a documented price is an [estimate]. A one-hour test on a throwaway Worker, torn down afterwards (under three dollars), would measure: what the vCPU is (the biggest unknown); time from first request to ready with a never-used image, after an idle sleep and with a warm host; first partial through the Worker against direct; streams per 4 vCPU container at one to four streams; a WebSocket held for 10 minutes and two hours with and without pings, and a redeploy during a stream; the bill for the hour (what "active CPU" means); and the image pull in a second location. Until then, plan with the numbers on this page and treat the Cloudflare capacity as the least certain input. Service changes the base-plus-burst design needs, not yet made: a readiness URL with a configurable utilisation ceiling, and a drain mode (stop accepting streams, finish the open ones, exit). ## Sources All read on 2026-12-05; the date in brackets is the page's own last-modified date where it shows one. The full report with every row is `docs/CLOUDFLARE-SERVERLESS.md` in the repository. - Containers: [overview](https://developers.cloudflare.com/containers/) (2026-12-03), [limits](https://developers.cloudflare.com/containers/platform/limits/) (2026-12-03), [pricing](https://developers.cloudflare.com/containers/platform/pricing/) (2026-11-13), [FAQ](https://developers.cloudflare.com/containers/faq/) (2026-12-03), [architecture](https://developers.cloudflare.com/containers/concepts/architecture/), [WebSocket example](https://developers.cloudflare.com/containers/examples/websocket/), [blog](https://blog.cloudflare.com/faster-agent-sandboxes/) (2026-09-30), [launch post](https://blog.cloudflare.com/containers-are-available-in-public-beta-for-simple-global-and-programmable/) (2025-06-24) - Workers and Durable Objects: [limits](https://developers.cloudflare.com/workers/platform/limits/) (2026-11-25), [pricing](https://developers.cloudflare.com/workers/platform/pricing/) (2026-12-03), [Durable Objects pricing](https://developers.cloudflare.com/durable-objects/platform/pricing/) (2026-11-13), [WebSockets](https://developers.cloudflare.com/durable-objects/best-practices/websockets/) (2026-11-18), [runtime API](https://developers.cloudflare.com/workers/runtime-apis/websockets/) (2026-11-18) - Network, Tunnel, Load Balancing: [WebSockets](https://developers.cloudflare.com/network/websockets/) (2026-08-14), [connection limits](https://developers.cloudflare.com/fundamentals/reference/connection-limits/) (2026-11-13), [Tunnel](https://developers.cloudflare.com/tunnel/) (2026-11-18), [monitors](https://developers.cloudflare.com/load-balancing/monitors/create-monitor/) (2026-07-23), [limitations](https://developers.cloudflare.com/load-balancing/reference/limitations/) (2026-04-16), [R2](https://developers.cloudflare.com/r2/pricing/) (2026-10-30) - Workers AI and Realtime: [pricing](https://developers.cloudflare.com/workers-ai/platform/pricing/) (2026-11-18), [limits](https://developers.cloudflare.com/workers-ai/platform/limits/) (2026-09-17), [models](https://developers.cloudflare.com/workers-ai/models/) (2026-08-12), [Realtime](https://developers.cloudflare.com/realtime/) (2026-10-19), [voice agents](https://developers.cloudflare.com/agents/agent-class/communication-channels/voice/) (2026-11-21) - AWS (pages carry no date): [spot interruption notices](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-instance-termination-notices.html), [Auto Scaling warm pools](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html), [on-demand pricing](https://aws.amazon.com/ec2/pricing/on-demand/) - Our data: [cloudflare_coldstart.csv](https://speech.unidatum.com/data/cloudflare_coldstart.csv), [cloudflare_handoff.csv](https://speech.unidatum.com/data/cloudflare_handoff.csv), [costs.csv](https://speech.unidatum.com/data/costs.csv), [instances.csv](https://speech.unidatum.com/data/instances.csv), and the [cost model](https://speech.unidatum.com/costs/) and [EC2 benchmark](https://speech.unidatum.com/performance/#ec2) pages. Deepgram, Nova, Flux and Aura are trademarks of Deepgram, Inc.; Cloudflare, Workers and R2 of Cloudflare, Inc.; AWS and Amazon EC2 of Amazon.com, Inc. --- # R&D: 50 simultaneous voice-agent calls, 08:00 to 23:00 Source: https://speech.unidatum.com/rnd/50-calls/ All pages as markdown: https://speech.unidatum.com/llms.txt # 50 simultaneous voice-agent calls, 08:00 to 23:00 A low-cost design for 50 calls at once, 15 hours a day, on Unidatum Speech: **nine Graviton4 c8g.4xlarge at the peak, each running speech to text and two of our own Kokoro voices (the layout we measured), a load balancer with the service's own admission cap, an auto scaling group that follows the day, spot capacity above an on-demand floor, and Deepgram as the last overflow.** About **$0.9 to $1.6 thousand a month** for speech to text alone and **$1.2 to $2.8 thousand** with our own voices, against $6.6 thousand for Deepgram speech to text alone. The full document is `docs/SOLUTION-50-CALLS.md` in the repository; the model is `docs/data/solution50.py`. - [measured] our own runs: solid lines and bars, data files linked - [sourced] a price or fact read from a vendor page, with the page and date (all 2026-12-05 unless shown) - [modelled] arithmetic or a simulation on those inputs: **dashed lines, hatched bars**, assumptions listed under the chart and the script linked - [assumption] an input we chose, editable in the script - The answer - Sizing - Cost options - Spot - Fewer calls - Text to speech - Architecture - Operations - Plan and go or no-go - EC2 test - Sources ## The answer ### Speech and voices together **Nine c8g.4xlarge** at the peak, each running 6 fast + 2 final vCPUs of speech to text and two 4-thread Kokoro voices on the other 8: **7 to 8 calls per instance at the knee, 6.8 planned**, so 9 carry 61 calls and 54 after losing one [measured] (first partial about 0.95 s, finals 1 to 1.7 s, voice first audio 0.8 s). ### Speech to text alone If the agent's voice is a cloud service: **five c8g.4xlarge** (80 vCPUs), 68 planned streams against 50 calls, 54 after a loss [measured] capacity (knee 16, 13.6 planned), [modelled] fleet. About one stream per vCPU at the knee. ### How it is bought **Two on-demand instances as the floor, the rest on spot**, scheduled 07:45 to 23:15 and following load. **No savings plan:** a plan is paid 24 hours a day and this fleet runs 15, so a 1-year plan costs more per used hour than on-demand [modelled]. ### Front and fallback One **application load balancer** (WebSocket, idle timeout 3600 s), `max_sessions` 7 per instance, HTTP 503 `CAPACITY` sends the client to **Deepgram**, which PowerConduit already does. A separate AMD voice pool is a later, modelled saving. | plan | hours per day | | --- | --- | | 1-year Compute Savings Plan, no upfront | 17.2 | | 3-year Compute Savings Plan, no upfront | 11.6 | Monthly, infrastructure only (operations about $500 a month on top): **speech to text alone $898 to $1,179** (call-centre day to flat 50, spot floor), $1,074 to $1,580 on-demand, $2,437 24/7 on-demand; **speech plus our own voices on the same instances $1,354 to $1,838** on spot, $1,901 to $2,774 on-demand; with Fish Audio voices $3.7 to $8.6 thousand; **Deepgram Nova-3 $6,570 (pay as you go) or $5,749 (Growth)** for speech to text, $10 to $21 thousand with Aura-2 voices [sourced] prices, [modelled] fleet. The fleet beats Deepgram from about **5 average calls**, or 9 with $500 of operations. ## Sizing: vCPUs, instances and headroom Our measurements of 2026-12-05: a c8g.8xlarge with 24 of 32 vCPUs carried **28 live English streams cleanly** (p90 final lag 1.7 s, 24 planned); a c8g.4xlarge on all 16 vCPUs, loaded from a second instance, had its knee at **16 streams** (p90 1.85 s, none lost to 24), 13.6 planned [measured]. The fast stage gets three times the cores of the final stage. Whisper small (other languages) carries about 12 streams per 24 vCPUs. Memory about 20 GB per 24 worker cores. Service start to healthy 8.0 to 8.7 s. *Chart: Fleet options against the 50-call peak. Planned live streams (0.85 of the knee) for each mix, and what is left after losing its largest instance. Solid = built on a measured capacity; hatched = modelled from it. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* **Why small instances.** The speech-only fleet is five 4xlarge; with the agent's voices on the same instances (measured, last section) it is nine. Every Graviton size costs the same per vCPU ($0.0399 an hour on-demand), so the size is about granularity and blast radius. Five 4xlarge follow a daily curve in steps of 13.6 streams, survive the loss of any one instance and are the size measured on all its cores. A single 16xlarge or two 8xlarge for 50 calls have 92% load and no failover; three 8xlarge or two 16xlarge work but cost more at night and are modelled, not measured. AMD c7a carries fewer streams per vCPU (0.71 against 0.85 planned) at a 29% higher price per vCPU, so six are needed; it is the better home for voices. **Headroom for the ramp.** At 50 calls each instance holds 10 sessions against a cap of 14 and a knee of 16. The group sizes to calls x 1.1 / 13.6, at least two, ten minutes ahead of the load; a jump from 35 to 50 in a minute is absorbed by the cap and by the spill to Deepgram. Non-English calls count double: each Whisper stream costs about two English streams. *Chart: The load: calls in progress through the day. Three modelled shapes with the same peak of 50 calls: flat (the requirement read literally), a call-centre day averaging 34, and a peakier day averaging 26. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: Instances an auto scaling group would run, hour by hour. c8g.4xlarge instances (13.6 planned streams each) for the three load shapes; at least two while open, none overnight. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* ## Cost options per month AWS prices read from the AWS Price List API, the Savings Plans offering rates and the spot price history, us-east-1, Linux, on 2026-12-05 [sourced]. | instance | vcpu | on demand usd h | sp1y no upfront usd h | sp3y no upfront usd h | spot mean 30d usd h | | --- | --- | --- | --- | --- | --- | | c8g.4xlarge | 16 | 0.63808 | 0.45744 | 0.30892 | 0.3176 | | c8g.8xlarge | 32 | 1.27616 | 0.91488 | 0.61784 | 0.5484 | | c8g.12xlarge | 48 | 1.91424 | 1.37231 | 0.92676 | 0.8997 | | c8g.16xlarge | 64 | 2.55232 | 1.82975 | 1.23568 | 0.9277 | | c7a.4xlarge | 16 | 0.82112 | 0.59338 | 0.39646 | 0.3073 | | c7a.8xlarge | 32 | 1.64224 | 1.18677 | 0.79291 | 0.6324 | | c8g.4xlarge+voices | 16 | 0.63808 | 0.45744 | 0.30892 | 0.3176 | *Chart: Monthly cost of speech to text for 50 calls, by way of buying. US dollars a month, infrastructure only (instances, load balancer, NAT, logs, disks); operations excluded. Flat 50 against a call-centre day averaging 34. The two bars marked "+ voices" include the agent's voices on the same instances (measured layout); the others are speech to text only. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* 1. **Scheduling alone saves 35%** against running 24/7 on-demand, with no commitment; following the load saves another third on a real day. 2. **A plan is paid for 24 hours.** The 3-year plan wins only above 11.6 hours of use a day, the 1-year plan above 17.2. At 15 hours the 3-year plan costs $0.49 per used hour against $0.64 on-demand and the 1-year plan $0.73. It suits only the part of the fleet that is up all day, or an account with other steady compute for the night hours. 3. **Spot with an on-demand floor of two** is the cheapest honest option ($898 to $1,179), 16 to 25% below scheduled on-demand, with 10% of spot hours charged on-demand as the fallback. 4. **Deepgram** Nova-3 streaming is $0.0048 a minute pay as you go and $0.0042 on Growth ($4,000 a year prepaid); concurrency caps 150 and 225 streams; the page still marks the price "promo" with no end date (deepgram.com/pricing, 2026-12-05). If it ends, add about 60%. 5. **Own hardware** costs $69 to $337 a month for 50 calls (14 Mac minis at the measured cap of 4 streams, or 7 i9 workstations at half their cores, amortised over 48 months with power) [modelled], but with no failover, one site, a home uplink and our own time. It is the right home for the first dozen internal channels, not a 50-call service level. The M4 mini is no longer sold; Apple lists the M6 from $899 (2026-08-25) [sourced]. *Chart: A plan is paid for 24 hours a day: cost per hour you actually use. c8g.4xlarge, US dollars per used hour against hours of use per day. A plan wins only above the crossing with on-demand. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* ## Spot with on-demand fallback: what a live call sees EC2 gives a **two-minute** interruption notice through instance metadata and an event, and often an earlier **rebalance recommendation**; Auto Scaling's price-capacity-optimized strategy and Capacity Rebalancing replace instances ahead of time; a warm pool does not support spot in a mixed group (docs.aws.amazon.com, 2026-12-05) [sourced]. ```mermaid sequenceDiagram %% title: What happens to live calls when a spot instance is reclaimed: drain on the first signal, finish what can finish, reconnect the rest participant EC2 as EC2 Spot participant SC as Sidecar on the instance participant SV as Speech service participant LB as Load balancer participant ASG as Auto Scaling group participant CL as Voice agent client EC2->>SC: rebalance recommendation, often minutes ahead SC->>LB: readiness check fails, no new calls SC->>SV: drain, refuse new sessions ASG->>ASG: launch the replacement, from the warm pool or on-demand EC2->>SC: interruption notice, 2 minutes Note over SV,CL: calls that end within 2 minutes finish normally SC->>SV: close the rest at a pause, with a close code SV->>CL: close, clean CL->>LB: reconnect, replay the last 3 seconds of audio LB->>CL: a healthy instance, or 503 and Deepgram ``` A small sidecar on each instance polls both signals every 5 seconds, fails the readiness check at the first one, and closes the rest of the calls at a pause 20 seconds before the end. The agent runtime reconnects and replays the last 3 seconds of audio: in our earlier handoff test **a handoff at a pause lost 0% of words, mid-utterance with replay 0%, without replay 25.9%** [measured]. If spot is short, two on-demand instances stay and Deepgram takes the excess; a runbook action switches the group to on-demand for the day. With a 10% monthly interruption rate [assumption] and two of five instances on-demand, the model expects **0.1 interruption events a month and about 0.7 calls a month cut out of 184,000** before the drain and the replay shorten even that [modelled]. The real risk is a wave across a zone, which the on-demand floor, three zones and the spill are for. ## If average concurrency is less than 50 A typical call-centre curve keeps the same peak and lowers the average to 25 to 35 calls. The group follows the curve, so the cost falls with the average (the call-centre day above: $898 instead of $1,179) but never below the two-instance floor of about $670. The chart shows a flat load of N calls for 15 hours with the fleet sized for N. *Chart: If fewer calls arrive: monthly cost against average concurrent calls. A flat load of N calls for 15 hours a day, the fleet sized for N. Self-hosting beats Deepgram from about 5 calls; with $500 a month of operations, from about 9. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* **Break-even:** the fleet is cheaper than Deepgram pay as you go from **5.1 average calls** (139 thousand minutes a month), against Growth from 5.8; with $500 a month of operations, from 8.9 calls (243 thousand minutes). Below about ten average calls, stay on Deepgram. ## Text to speech If the agent speaks 40% of the time [assumption], 50 calls mean 20 voices speaking on average and **28 at the 99th percentile** (binomial; 19 with 40% of the speech cached): the no-wait bound. The EC2 test below served 6 to 8 calls' agents with two voices (0.25 to 0.33 voices per call) at a median first audio of 0.8 s. One audio minute is 855 characters. [measured] Kokoro needs **2 vCPUs per voice on AMD c7a (real-time factor 0.45) and 4 on Graviton4 (0.35)**. *Chart: Text to speech for 50 calls: monthly cost, flat 50 for 15 hours a day. The agent speaks 40% of the time. Without cached audio and with 40% of its speech served from cache or pre-synthesised audio. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* | option | cache hit | peak voices p99 | instances | monthly usd scheduled od | per call minute | concurrency limit | | --- | --- | --- | --- | --- | --- | --- | | Kokoro on c7a.4xlarge (2 vCPU per voice) | 0 | 28 | 4 | 1524 | 0.00111 | your own pool | | Kokoro on c7a.4xlarge (2 vCPU per voice) | 0.4 | 19 | 3 | 1143 | 0.00083 | your own pool | | Kokoro on c8g.4xlarge (4 vCPU per voice) | 0 | 28 | 7 | 2072 | 0.00151 | your own pool | | Kokoro on c8g.4xlarge (4 vCPU per voice) | 0.4 | 19 | 5 | 1480 | 0.00108 | your own pool | | Fish Audio s3-pro | 0 | 28 | 0 | 7022 | 0.00513 | Scale plan: 50 concurrent, $500 a month (fee becomes credit) | | Fish Audio s3-pro | 0.4 | 19 | 0 | 4213 | 0.00308 | Scale plan: 50 concurrent, $500 a month (fee becomes credit) | | Deepgram Aura-2 PAYG | 0 | 28 | 0 | 14043 | 0.01026 | 45 streaming (PAYG), 60 (Growth) | | Deepgram Aura-2 PAYG | 0.4 | 19 | 0 | 8426 | 0.00616 | 45 streaming (PAYG), 60 (Growth) | | Deepgram Aura-2 Growth | 0 | 28 | 0 | 12639 | 0.00923 | 45 streaming (PAYG), 60 (Growth) | | Deepgram Aura-2 Growth | 0.4 | 19 | 0 | 7583 | 0.00554 | 45 streaming (PAYG), 60 (Growth) | | Deepgram Aura-1 PAYG | 0 | 28 | 0 | 7022 | 0.00513 | 45 streaming (PAYG), 60 (Growth) | | Deepgram Aura-1 PAYG | 0.4 | 19 | 0 | 4213 | 0.00308 | 45 streaming (PAYG), 60 (Growth) | | Amazon Polly neural | 0 | 28 | 0 | 7490 | 0.00547 | not read | | Amazon Polly neural | 0.4 | 19 | 0 | 4494 | 0.00328 | not read | | Amazon Polly generative | 0 | 28 | 0 | 14043 | 0.01026 | not read | | Amazon Polly generative | 0.4 | 19 | 0 | 8426 | 0.00616 | not read | | OpenAI tts-1 | 0 | 28 | 0 | 7022 | 0.00513 | not read | | OpenAI tts-1 | 0.4 | 19 | 0 | 4213 | 0.00308 | not read | | ElevenLabs Flash (as listed, $0.04 per 1,000 characters) | 0 | 28 | 0 | 18724 | 0.01368 | not read | | ElevenLabs Flash (as listed, $0.04 per 1,000 characters) | 0.4 | 19 | 0 | 11235 | 0.00821 | not read | - **Own voices:** measured on Graviton4, four vCPUs per voice and about 2 vCPUs per call, first audio 0.8 s, text stays in the network: $0.0013 to $0.0022 per call-minute all-in with speech to text on the same instances. A separate pool of 3 to 4 c7a instances (2 vCPUs per voice, $1,100 to $1,500 a month at the no-wait size) costs about the same without a cache and 9% less with one; c7a voices were measured alone, not yet next to speech. - **Fish Audio** s3-pro: $15 per million UTF-8 bytes, 5 concurrent requests on pay as you go, 50 on the $500 Scale plan; vendor-stated model time to first audio about 40 to 60 ms excluding the network; text goes to Fish Audio (US and Tokyo regions, retention not fixed, zero retention only on enterprise contracts) [sourced]. The voice library and the latency are the reasons to pay four to five times as much. - **Deepgram Aura-2** $30 per million characters (Aura-1 $15), streaming limit 45 on pay as you go, 60 on Growth; documentation example 616 ms to first byte against marketing figures of 90 to 200 ms [sourced]. **Polly neural** $16, **OpenAI tts-1** $15, **ElevenLabs Flash** $0.04 per thousand characters as listed. - **Local speech to text with a cloud voice** costs about the same as Deepgram speech to text alone ($5.4 to $8.2 thousand a month with Fish). The service already has a Fish provider with a Kokoro fallback, so a per-call choice of voice is a request field. - **Cache** greetings, confirmations, hold phrases and fixed script lines: it cuts the pool by a quarter and every per-character bill by 40% at a 40% hit rate [assumption], and plays with no first-audio delay. *Chart: Cost per call-minute: speech to text alone, with our own voices, with a cloud voice. US dollars per call-minute (a minute of one call, in which the agent speaks 40% of the time). All-Deepgram means Nova-3 PAYG plus Aura-2. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* ## Architecture ```mermaid flowchart TB %% title: Architecture for 50 calls: agent runtime, a load balancer, one group of Graviton4 instances running speech and voices, an optional voice pool, Deepgram as the last overflow AG[Voice agent runtime
PowerConduit or any Deepgram client] -->|wss over TLS| LB[Application load balancer
WebSocket, idle timeout 3600 s
health check on /ready] AG -.->|503 CAPACITY or no answer| DG[Deepgram, last overflow] subgraph VPC[Private subnets, two zones] LB -->|/v1/listen and /v1/speak| STT[Speech and voice group
c8g.4xlarge, 2 to 9 instances
6 fast + 2 final + two 4-thread voices
max_sessions 7 each] LB -.->|phase 2 option, modelled| TTS[Voice pool
c7a.4xlarge, 8 voices each] end subgraph CTRL[Control] SCH[Scheduled actions
07:45 up, 23:15 down] --> STT MET[CloudWatch metric
sessions per instance, target 70 percent] --> STT WP[Warm pool
stopped, models on the disk image] --> STT MET --> TTS SCH --> TTS end ``` ### Load balancer and routing ALB has native WebSocket support; idle timeout 60 s by default, up to 4000 s; deregistration delay up to 3600 s; NLB TCP idle 350 s, 350 s fixed with TLS [sourced]. The service enforces `max_sessions` (503 `CAPACITY` before the upgrade; 7 with voices) and `/health` reports `sessions` of `capacity`. The target-group check should use a **readiness** that fails when 90% full or draining; do not let the ELB health check drive replacement, or a full instance would be replaced. ### Auto scaling Scheduled actions at 07:45 (min 2, desired 3) and 23:15 (zero); **target tracking on sessions as a share of `max_sessions`, target 70%**, from the service's `unidatum_speech_sessions` gauge published by a sidecar; a step alarm on final lag p95 above 1.8 s; a termination hook that waits for the calls to end (up to 15 minutes). ### Cold start and warm pool Service start to healthy 8.0 to 8.7 s [measured]; on EC2 plan 60 to 120 s from launch to first call and 9 to 30 s on a running instance [assumption] (boot and lazy snapshot reads not measured). Scheduled scale-out hides it for the daily ramp; an on-demand floor group with a warm pool of stopped, pre-initialised instances (disk cost only) covers surprises; spot pools have none. ### Images and updates Packer bakes one AMI per release with the models, no downloads at boot; instance refresh outside open hours; the daily scale to zero replaces every instance, which also removes the state build-up seen after long runs [measured]. ### Zones and health Two zones for the floor, three for spot; losing a zone leaves 3 of 5 instances, 41 planned streams, and Deepgram for the rest; six instances if the full 50 must survive a zone loss. EC2 health plus a sidecar that marks an instance unhealthy after three minutes of failed `/health`. ### Security Private subnets; the instances accept port 18790 only from the load balancer; SSM Session Manager (or Tailscale) instead of SSH; TLS at the ALB with ACM; service keys in Parameter Store, one per client project; IMDSv2; encrypted disks; VPC endpoints or one NAT gateway for egress; the Deepgram and Fish keys only where they are used. ```mermaid flowchart LR %% title: The day: scheduled floor, load-following scale-out and scale-in, and the warm pool that hides the cold start N[23:15 scale to zero] --> M[07:45 scheduled floor of 2 to 3 instances] M --> R[Morning ramp: sessions per instance passes 70 percent] R --> W{Warm pool has a ready instance?} W -->|yes, about 30 s| UP[Start it, tested, then added to the load balancer] W -->|no, 60 to 120 s| CO[Launch from the image, models already on the disk] UP --> PK[Peak: 5 instances, 50 calls] CO --> PK PK --> EV[Evening: sessions per instance below 40 percent for 15 minutes] EV --> DR[Drain the oldest instance, wait for its calls, terminate] DR --> N ``` ## Operations, runbook and failure modes | When | What to do | | --- | --- | | 07:55 each day | Check that the instances are in service and the canary call is green; page if fewer than two. | | Calls rejected | Rising `sessions_rejected_total`: check the Deepgram spill count, raise the group maximum; if lag p95 is above 2 s add instances, never raise `max_sessions`. | | Spot short | Desired minus in service above zero for five minutes: set the on-demand share to 100% until 23:15; the spill covers the gap. | | Zone outage | The group launches elsewhere; if capacity is short, spill to Deepgram and raise the maximum. | | Release | Bake, smoke-test on one instance, update the image parameter, instance refresh at 23:30; roll back by resetting the parameter. | | Voices stall | First-audio p95 above 1 s: add a voice instance, raise the cache, check for 2-core voices above 80% busy. | | Failure | Effect | Mitigation | | --- | --- | --- | | One instance lost at the peak | 10 calls reconnect | Four instances carry 54 planned streams; replay on reconnect; spill | | Spot reclaim wave | up to three instances in two minutes | Floor of two on-demand; drain on the first signal; many pools; on-demand switch | | Scheduled action late | thin start at 08:00 | Starts at 07:45; alarm at 07:55 | | Degradation after long uptime | lag grows, streams lost | Daily scale to zero | | Final pass overloaded | unpunctuated finals after 8 s | Lag guard; alarm on `final_fallbacks_total` | | More non-English than planned | capacity halves for those calls | Alarm on the language share; size by mix | An infrastructure sketch (launch templates, a mixed-instances group with an on-demand base of two, scheduled actions, a custom-metric target-tracking policy, the lifecycle drain hook and the target group) is in `docs/SOLUTION-50-CALLS.md` section 5.8. A smaller start is two instances, scheduled, **about $680 a month**, 13 calls with voices (27 speech-only streams); nothing changes in the design as the group's maximum is raised. ## Phased plan and go or no-go ```mermaid flowchart LR %% title: Phases and the go or no-go gates P0[Phase 0, week 1: one instance, 14 streams, a call simulator] --> G0{Gate 1: p90 final lag under 2 s, no stream lost} G0 -->|go| P1[Phase 1, weeks 2 to 3: two instances, ALB, scheduled, 20 calls, real traffic] G0 -->|no go| DGP[Stay on Deepgram, fix the measured gap] P1 --> G1{Gate 2: 15 h soak, rejects under 1 percent, drain proven} G1 -->|go| P2[Phase 2, weeks 4 to 6: auto scaling to 5, spot, voice pool, 50 calls] G1 -->|no go| P1 P2 --> G2{Gate 3: 50-call soak, 15 h, on the real mix} G2 -->|go| P3[Phase 3: plans or spot, runbook, on-call] G2 -->|no go| DGP ``` | Option | Monthly | Choose it when | | --- | --- | --- | | Deepgram pay as you go or Growth | $6,570 / $4,424; $5,749 / $3,871 | fewer than about 9 average calls, or the first month | | Fleet, scheduled on-demand | $1,580 / $1,074 | the safe default after the gates | | **Fleet, 2 on-demand + spot, follows load** | **$1,179 / $898** | **the recommendation** | | Fleet + 3-year plan on the floor | $1,252 / $943 | after a year of data | | 24/7 on a plan or on-demand | $1,235 or $2,437 | only if the account has other steady compute | | Own machines | $69 to $337 | internal traffic up to about a dozen calls | | **Speech + voices on the same c8g instances** | **$1,838 / $1,354** (on-demand $2,774 / $1,901) | **the first build, English agents** | | Voices on a separate c7a pool | speech + $500 to $1,524 | a later saving if the soak confirms it | | Voices: Fish Audio | + $2,837 to $7,022 | a particular voice or language is required | ### Benchmarks still to run, and the numbers to confirm - A **50-stream, 15-hour soak** on the real instance mix with a call simulator that ramps 0 to 50 in an hour, speaks and pauses, and requests voices at 40% duty. Gate: p90 final lag under 2 s, first partial under 1.2 s, rejects under 1%, voice first-audio median under 1 s and no more stalls than voices alone, memory under 85%. - Speech plus voices on one instance (first run below); non-English share at 10 and 25%; snapshot-restore and warm-pool resume times; `least_outstanding_requests` against round robin with open WebSockets; a spot interruption rehearsal with live calls; the cache hit rate on the real script. - Numbers to confirm: streams per instance on real telephone audio, the real concurrency curve and call length, the speaking share, the language mix, the c8g spot interruption rate, whether the Nova-3 promo price is still on, operations hours. - Service changes proposed, not made: a `/ready` endpoint with a utilisation ceiling and a drain mode (today SIGTERM stops the HTTP server after 5 seconds). **Go** if the three gates pass and the real average is above about ten calls; **no go** (stay on Deepgram) if the soak fails the latency gate on the chosen layout, or the average stays below ten. ## A short real test on EC2 Two c8g.4xlarge in one zone, 33.9 minutes, **$0.75** (cap $5), tagged, with a safety shutdown, both terminated and verified gone with the AWS CLI; instance A ran the service, instance B the load: N speech streams plus N agents that speak 40% of the time through `/speak`. One run per layout, 2026-12-05 [measured]. *Chart: Measured on a c8g.4xlarge: calls with their voices on 16 vCPUs, speech to text lag. Final lag after the speaker stops, p90 in seconds, by layout: calls (one stream plus an agent speaking 40% of the time) and the voice workers (voices x threads each, for example 2v x 4t) on the same instance. STT-only references first. The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* *Chart: The same runs: how fast the voices ran. Real-time factor of the voices (median; below 1 is faster than real time, we want 0.5 or less) and first audio in seconds (median). The numbers are in the tables and in the data files under https://speech.unidatum.com/data/.* - Speech only: 14 streams p90 1.64 s, 16 streams 1.89 s, none lost: **the knee of 16 and the planned 13.6 hold**. - Speech plus voices on the same 16 vCPUs: **7 to 8 calls** with 6 fast + 2 final vCPUs and two 4-thread voices; p90 final lag 1.69 s at 7 and 1.73 to 1.85 s at 8, voice real-time factor 0.45, first audio 0.8 s median (3.0 s p90 at 8 when three speak at once). Plan 6.8 per instance: about 2 vCPUs a call. - Voices of two threads fell behind (real-time factor 0.82 at 6 calls, 1.13 at 8): on Graviton4 a voice needs four. - **No layout had zero stalls**, voices alone included (Kokoro synthesises sentence by sentence); 9 to 10% of audio time with 4-thread voices against 8.4% alone. Use "no more than the voices alone", or a one-second jitter buffer on the client. - **What it changed:** the voice pool sized by simultaneous speakers is the no-wait bound; the measured layout needs 9 instances for 50 calls with voices ($1,838 a month on spot) and costs about the same as the modelled separate AMD pool without a cache, with one image and one group. - Limits: one run per cell (8 calls twice, noise about 0.1 s); split of cores not tuned; synthetic agent model without barge-in; clean read English; no AMD mixed run; nothing at 12 or more calls. Raw files: `service/tests/ec2/solution50/`; data: [ec2_mixed_c8g4xl.csv](https://speech.unidatum.com/data/ec2_mixed_c8g4xl.csv). ## Sources All read on 2026-12-05. AWS documentation pages carry no date. Several vendor pages were read through a summarising tool: re-check any figure before a contract. Azure and Google text-to-speech prices could not be confirmed and are left out. - AWS: Price List API and Savings Plans offering rates (command line, us-east-1, effective 2026-12-01); EC2 spot price history (30 days to 2026-12-05); [spot interruption notices](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-instance-termination-notices.html), [rebalance recommendations](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/rebalance-recommendations.html), [allocation strategies](https://docs.aws.amazon.com/autoscaling/ec2/userguide/allocation-strategies.html), [warm pools](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html), [scheduled scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-scheduled-scaling.html), [target tracking](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html), [ALB attributes](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/edit-load-balancer-attributes.html), [NLB](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html), [load balancer pricing](https://aws.amazon.com/elasticloadbalancing/pricing/), [Polly pricing](https://aws.amazon.com/polly/pricing/). - Speech vendors: [Deepgram pricing](https://deepgram.com/pricing), [Deepgram rate limits](https://developers.deepgram.com/reference/api-rate-limits), [Deepgram TTS latency](https://developers.deepgram.com/docs/text-to-speech-latency), [Fish Audio pricing and limits](https://docs.fish.audio/developer-guide/models-pricing/pricing-and-rate-limits), [Fish Audio enterprise](https://fish.audio/enterprise/), [Fish Audio privacy](https://fish.audio/privacy), [OpenAI pricing](https://developers.openai.com/api/docs/pricing), [ElevenLabs API pricing](https://elevenlabs.io/pricing/api); Apple: [Mac mini power](https://support.apple.com/en-us/103253). - Our data: [solution50_prices.csv](https://speech.unidatum.com/data/solution50_prices.csv), [sizing](https://speech.unidatum.com/data/solution50_sizing.csv), [profile](https://speech.unidatum.com/data/solution50_profile.csv), [monthly](https://speech.unidatum.com/data/solution50_monthly.csv), [tts](https://speech.unidatum.com/data/solution50_tts.csv), [callmin](https://speech.unidatum.com/data/solution50_callmin.csv), [avgcurve](https://speech.unidatum.com/data/solution50_avgcurve.csv), [ec2_concurrency.csv](https://speech.unidatum.com/data/ec2_concurrency.csv), [ec2_tts.csv](https://speech.unidatum.com/data/ec2_tts.csv), [ec2_mixed_c8g4xl.csv](https://speech.unidatum.com/data/ec2_mixed_c8g4xl.csv), the model [solution50.py](https://speech.unidatum.com/data/solution50.py) and [the cost model](https://speech.unidatum.com/costs/). Deepgram, Nova and Aura are trademarks of Deepgram, Inc.; AWS, Amazon EC2 and Amazon Polly of Amazon.com, Inc.; Fish Audio of Hanabi AI Inc.; ElevenLabs of ElevenLabs Inc.; OpenAI of OpenAI.