Cartesia Streaming TTS: Latency, WebSockets, and Cost per Call
Why We Evaluated Cartesia for Voice Agents
We brought Cartesia into our voice-infrastructure review because “fast TTS” is an incomplete purchasing criterion. We need to know when usable audio reaches our application, whether playback can remain continuous, and what interrupted or retried speech does to the bill.
Public benchmarks and the documented WebSocket interface support a controlled proof of concept, but unmeasured latency, reliability, and billing leave production readiness unproven.
Our production concern is the gap between receiving an audio chunk and playing it to a caller. Connection establishment, text buffering, output decoding, playback buffering, and telephony transport all sit around synthesis. A vendor-level latency number cannot stand in for that entire path.
Cartesia’s relevant interface is a persistent WebSocket carrying text into generation contexts and audio back out. We can append incremental LLM text to the same context instead of waiting for an entire response. That is a useful architectural fit for voice agents, but it introduces lifecycle and buffering decisions that a simple HTTP request hides.
Our evidence boundary matters: we reviewed the official interface and the supplied benchmark material, but we did not execute authenticated Cartesia requests. We had neither credentials nor live network access for this review. Consequently, we have no firsthand service latency, jitter, error-rate, retry, or billing measurements. The executable example below includes an explicitly simulated mode; it is not a Cartesia performance result.
That leaves us with a narrower but still actionable verdict: Cartesia merits an instrumented proof of concept, not an unconditional production recommendation.
We also keep the surrounding voice stack separate. Our jambonz versus LiveKit concurrency review addresses infrastructure capacity; this review isolates the TTS boundary. Neither layer proves the other is production-ready.
Hands-On Walkthrough: Setup, Execution & Output
We anchored our integration design to the official WebSocket reference and realtime quickstart.
The interface we reviewed establishes these configuration requirements:
| Setting | Our integration choice |
|---|---|
| Endpoint | wss://api.cartesia.ai/tts/websocket |
| API version | Explicitly pin a supported version; the reference gives 2026-08-14 as an example |
| Model | sonic-3.6, not the moving sonic-latest alias |
| Voice | One fixed voice ID throughout the comparison |
| Output | Raw, 44.1 kHz, pcm_f32le, matching the quickstart |
| Context | A fresh generation context for each utterance |
| Input completion | Explicit no_more_inputs() |
We would not copy a direct WebSocket authentication implementation from the truncated reference excerpt: it does not establish the complete authentication and response contract. The example instead uses the official SDK flow.
The installation commands are straightforward:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install 'cartesia[websockets]'
python -m pip freeze > requirements.lock
export CARTESIA_API_KEY="replace-with-your-server-side-key"
We have not validated a particular SDK release exposing these methods. Before a real benchmark, inspect the installed package, confirm the quickstart works, and retain the resulting lockfile. Installing an unpinned package is a bootstrap step, not a reproducible benchmark environment. The scaffold below also relies on the SDK’s version configuration; a formal run must verify and record its effective wire-level API version.
Save this as bench_cartesia.py. Default execution uses synthetic events with invented timings. Passing --live switches to the SDK and requires credentials.
import argparse
import json
import os
import statistics
import time
TEXTS = [
"Hello. How can I help you today?",
"Your appointment is on December third at nine thirty.",
"The total is forty-two dollars and fifteen cents.",
]
VOICE = "f786b574-daa5-4673-aa0c-cbe3e8534c02"
BYTES_PER_SECOND = 44100 * 4 # Mono float32 PCM.
def summarize(events, done_ms, connect_ms, chars, mode):
arrivals = [t for t, audio in events if audio]
sizes = [len(audio) for t, audio in events if audio]
gaps = [b - a for a, b in zip(arrivals, arrivals[1:])]
return {
"mode": mode,
"characters": chars,
"connect_ms": round(connect_ms, 3),
"ttfa_ms": round(arrivals[0], 3) if arrivals else None,
"done_ms": round(done_ms, 3),
"audio_seconds": round(sum(sizes) / BYTES_PER_SECOND, 3),
"audio_chunks": len(sizes),
"gap_mean_ms": round(statistics.mean(gaps), 3) if gaps else None,
"gap_stddev_ms": round(statistics.pstdev(gaps), 3) if gaps else None,
"gap_max_ms": round(max(gaps), 3) if gaps else None,
"retries": 0,
}
def run(text, live, client):
if not live:
# Synthetic fixture: these are not vendor measurements.
events = [(180.0, b"\0" * 17640),
(270.0, b"\0" * 17640),
(380.0, b"\0" * 17640)]
return summarize(events, 390.0, 35.0, len(text), "SIMULATED")
events = []
connected = time.perf_counter()
with client.tts.websocket_connect() as connection:
connect_ms = (time.perf_counter() - connected) * 1000
ctx = connection.context(
model_id="sonic-3.6",
voice=VOICE,
output_format={
"container": "raw",
"encoding": "pcm_f32le",
"sample_rate": 44100,
},
)
start = time.perf_counter()
ctx.push(text)
ctx.no_more_inputs()
for response in ctx.receive():
elapsed = (time.perf_counter() - start) * 1000
if response.type == "chunk" and response.audio:
events.append((elapsed, response.audio))
elif response.type == "error":
raise RuntimeError(str(response))
elif response.type == "done":
if not events:
raise RuntimeError("Generation ended without audio")
return summarize(
events, elapsed, connect_ms, len(text), "LIVE"
)
raise RuntimeError("Stream ended without a done event")
parser = argparse.ArgumentParser()
parser.add_argument("--live", action="store_true")
args = parser.parse_args()
client = None
if args.live:
from cartesia import Cartesia
client = Cartesia(api_key=os.environ["CARTESIA_API_KEY"])
for index, text in enumerate(TEXTS):
try:
row = run(text, args.live, client)
row.update(prompt_id=index, status="ok")
except Exception as exc:
row = {
"prompt_id": index,
"mode": "LIVE" if args.live else "SIMULATED",
"status": "error",
"error": str(exc),
"retries": 0,
}
print(json.dumps(row), flush=True)
Run either mode:
python bench_cartesia.py > simulated.jsonl
# Only after validating the installed SDK:
python bench_cartesia.py --live > live.jsonl
Illustrative output from the synthetic fixture—not observed Cartesia output:
{"mode":"SIMULATED","characters":32,"connect_ms":35.0,"ttfa_ms":180.0,"done_ms":390.0,"audio_seconds":0.3,"audio_chunks":3,"gap_mean_ms":100.0,"gap_stddev_ms":10.0,"gap_max_ms":110.0,"retries":0,"prompt_id":0,"status":"ok"}
Our TTFA clock starts immediately before push() and stops at the first nonempty audio event delivered by the SDK. It excludes connection establishment and is not a packet-level first-byte measurement. It also excludes audible playback.
The gap standard deviation is interarrival variability, not a standardized network-jitter estimate. We need chunk durations and a playback-buffer simulation to determine whether those gaps cause underruns.
This is deliberately a measurement scaffold, not a load generator. It opens a connection per prompt, performs no retries, and lacks a hard deadline. For a real trial, we would add supervised process deadlines, raw per-chunk logs, partial-audio accounting on failure, and separate persistent-connection runs. These limitations prevent a misleadingly polished script from masquerading as a production benchmark.
Integration Constraints and Review Limitations
Our review had an immediate limitation: we could inspect the integration contract, but we could not complete the authenticated test. We therefore cannot honestly describe connection failures, SDK incompatibilities, or latency spikes as observed Cartesia defects.
We did identify concrete integration risks.
Input completion changes the experiment. In our interface review, we mapped push() to continue: true and no_more_inputs() to continue: false. We would explicitly mark input completion to minimize latency, while verifying the installed SDK’s wire-level behavior before benchmarking. Forgetting completion can make an input-lifecycle mistake look like slow synthesis.
Our scaffold follows that lifecycle. A follow-up experiment should distinguish complete-text submission from incremental text arriving on a fixed schedule. Sending every fragment immediately does not reproduce LLM streaming.
Buffering is a separate variable. In our configuration review, we identified a supported range of zero to 5,000 milliseconds for max_buffer_delay_ms, with a default of 3,000 milliseconds. We do not interpret that default as an unconditional three-second delay. Its effect depends on continuation, completion, and flushing behavior.
Our intended test matrix would vary buffering explicitly while retaining identical text-arrival timing. We would also listen to the results: reducing buffering is not a free quality improvement.
The language fields have a hard conflict. We found an explicit constraint against setting both language and locale. Our adapter design would normalize upstream configuration into one field before sending it, rather than allowing two services to independently populate both.
Raw PCM needs an exact contract. Our duration calculation assumes mono float32 PCM at 44.1 kHz. Changing the encoding without changing the denominator corrupts both generated-duration and per-minute-cost calculations. We would log encoding, sample rate, channel assumptions, and decoded byte counts alongside every measurement.
Retries can repeat speech. We would not automatically replay an utterance after audio has reached a caller. Before first audio, a bounded retry may be acceptable. After playback begins, recovery needs an explicit conversational policy and cancellation of obsolete output.
This is the same operational distinction we explore in LiteLLM proxy failover and retry risk: request recovery is not necessarily safe user-visible recovery.
Finally, we would keep permanent keys server-side and use ephemeral access tokens for browser integrations.
Scale, Latency & Cost vs. Alternatives
We kept external benchmark results in their original scope rather than relabeling them as our measurements.
| Evidence or alternative | Available result | Our decision boundary |
|---|---|---|
| Cartesia Sonic 3.6 in Coval’s benchmark | Mean TTFA of 280 ms, ranked 18th of 30; last measured November 27, 2026 | A comparison point, not our WebSocket latency |
| Sonic 3.6 intelligibility in the same benchmark | 1.3% WER, ranked second of 30 | Useful intelligibility evidence, not a naturalness score |
| Sonic Turbo in Async’s November 2025 comparison | We found over three times slower TTFB for Sonic Turbo than AsyncFlow and Eleven Flash in this HTTPS comparison | Older model and HTTPS transport; not a Sonic 3.6 WebSocket result |
| Eleven Flash and AsyncFlow in that comparison | Competitor latency and listening comparisons | Worth testing under our own identical transport and workload |
| Self-hosted TTS | No matched measurements in this review | Requires separate capacity, quality, operations, and GPU-cost testing |
| Our live Cartesia evaluation | Not executed | No measured p95, throughput, error rate, or invoice-derived cost |
We would not turn Coval’s 280 ms mean into a p95 promise. In our benchmark review, we could not verify the transport, client location, concurrency, or selected voice and output format behind that result. Its WER result also does not answer whether pronunciation, prosody, or emotional delivery suits our application.
In our review of Async’s competitor-authored comparison, we checked the test conditions: HTTPS streaming from us-central1, three warm-up runs per model, and 20 measured iterations per model, with median and p95 aggregation. We limit our interpretation to that configuration. Twenty iterations do not establish high-concurrency behavior, and the older Sonic Turbo result cannot be transferred to Sonic 3.6.
For our deployment gate, we would run the fixed text set repeatedly at concurrency 1, then at increasing levels within account limits. We would separate new and reused sockets, retain failures in the denominator, and report first-attempt and eventual-success rates independently. Warm-up requests would remain visible rather than disappearing from cost accounting.
Our practical cost model
We found no verified Cartesia rate card in the supplied material. Consequently, a dollar figure presented as Cartesia’s current price would be invented.
Instead, we use a worked example with hypothetical prices:
- Character rate: $10 per million billable characters.
- Agent speech: 900 characters per connected call minute.
- Call duration: four minutes.
- Regenerated or duplicated billable characters: 5%.
Then:
Billable characters per call = 900 × 4 × 1.05 = 3,780
TTS cost per call = 3,780 × $10 / 1,000,000
= $0.0378
TTS cost per connected minute = $0.0378 / 4
= $0.00945
Those are scenario calculations, not a Cartesia quote. We would replace the assumed character rate and billable-character count with the actual contract and usage ledger.
Generated-audio minutes require a different denominator:
Cost per generated minute =
total attributable TTS spend / generated audio minutes
Connected minutes include listening and silence. Generated minutes may include speech never played after an interruption. Mixing those denominators can make a vendor appear artificially cheap.
For a break-even example, suppose one candidate costs $0.012 per call and another costs $0.020, while integration and migration cost $4,000:
Break-even volume = $4,000 / ($0.020 - $0.012)
= 500,000 calls
We would only accept that calculation after matching quality, retries, abandonment, and operational overhead. Self-hosting deserves the same discipline: reserved capacity and engineering labor remain costs even when no one is speaking.
Our Final Verdict: When to Deploy, When to Skip
Our verdict is proceed to a controlled proof of concept; hold production sign-off.
We like the architectural fit: persistent transport, generation contexts, incremental text, and explicit input completion are appropriate primitives for voice-agent TTS. We have not established their latency or economics in our deployment.
We would deploy after a pilot if:
- Our region, voice, encoding, and concurrency meet a defined TTFA budget.
- Playback-buffer tests show acceptable continuity.
- Cancellation prevents obsolete speech from reaching callers.
- Retry behavior is safe before and after playback starts.
- Usage records reconcile with invoice-derived cost per call.
- Listening tests pass our actual names, numbers, and domain vocabulary.
We would hold off if:
- The purchasing case depends on interpreting a public mean as a tail-latency guarantee.
- We cannot pin the model, SDK, and API version.
- Our only cost estimate divides list pricing by assumed speech duration.
- We need unsupported claims about concurrency or automatic failover.
- We cannot observe partial failures and discarded generation.
Our next step would be small and measurable: validate the official quickstart, lock the environment, run the fixed prompts, and reconcile generated audio with usage. Until those results exist, the honest production answer is not “Cartesia is fast enough.” It is: we know what to measure, but we do not yet have the evidence to approve deployment.
Get the next one
in your inbox.
One short weekly dispatch with new guides, tools, and what we tested. No spam, unsubscribe anytime.
Get weekly AI tool reviews & automation tips
Join our newsletter. No spam, unsubscribe anytime.
More in Articles
We audit RunPod Serverless worker billing, cold-start evidence, scaling defaults, and queue limits, with a reproducible deployment example.
TEI provides dedicated embedding and reranker serving, but single-GPU co-serving requires workload-specific latency and capacity tests.
A reproducible Unsloth QLoRA DDP setup, fair single-vs-multi-GPU benchmark design, and deployment gates for memory, warmup, and GPU-hour costs.
We review Composio's user isolation, OAuth recovery, proxy authorization, and token custody, with a reproducible setup and production acceptance gates.