Skip to main content

voice-latency

A per-hop latency budget for voice agents. It models two architectures, cascaded (STT then LLM then TTS) and realtime (one speech-to-speech model), adds framework overhead, and tells you where the milliseconds go.

The numbers are the point. Every figure lives in one Python file with a source and a date, ours included. The seed values are Mahimai estimates; if you have a stronger source (measured, ideally with a screenshot), open a PR and cite it. That is how a latency benchmark stays honest.

⚠️ Disclaimer. These figures are Mahimai estimates, aggregated from public and community sources. They are not measurements of your system, and not vendor-published unless a source says so. They are approximate, they will drift as providers change, and they may simply be wrong. Use them to understand where a latency budget goes, not as a basis for SLAs, contracts, or purchasing decisions. The software and data are provided "as is", without warranty of any kind, and the maintainers accept no liability for any decision made using them. Verify against your own stack before you rely on a number.

This package powers the calculator at mahimai.ca/tools/latency-calculator; the site reads the same data, so the two never disagree.

Install

pip install voice-latency      # or: uv pip install voice-latency

Use it

from voice_latency import estimate

# Cascaded pipeline (default)
e = estimate(stt="Deepgram Nova-3", llm="GPT-4o mini", tts="Cartesia Sonic",
             transport="PSTN / SIP", endpointing=700, calls=25)
print(e.total_p50, e.total_p95)   # 1326 1589
print(e.max_hop)                  # 'endp'  (the endpointing delay you set)

# Realtime, speech-to-speech
r = estimate(mode="realtime", realtime="Gemini Live (Flash)",
             framework="LiveKit Agents", transport="WebRTC")
for hop in r.rows:
    print(f"{hop.label:<26} {hop.p50:>4}ms  p95 {hop.p95}ms")

From the terminal:

voice-latency                                   # default cascaded turn
voice-latency --mode realtime --realtime "OpenAI GPT Realtime"
voice-latency --framework "Google ADK (bidi streaming)" --transport WebRTC
voice-latency list                              # every provider it knows
voice-latency export --out data.json            # the dataset as JSON

The model

A turn's latency is the sum of independent hops. The p50 total sums the per-hop p50s. Percentiles do not add, so the p95 total adds each hop's spread (p95 minus p50) in quadrature on top of the p50 total. Hops:

  • cascaded: network in, jitter, STT, endpointing, LLM, TTS, network out
  • realtime: network in, jitter, endpointing, speech-to-speech model, network out
  • an orchestration framework, if any, adds one overhead hop

Constants (cross-region penalty, concurrency load, endpointing math, thresholds) live in MODEL in src/voice_latency/data.py.

The data

All of it is in src/voice_latency/data.py: STT, LLM, TTS, realtime speech-to-speech models, transport, and frameworks. Figures are illustrative defaults unless a source says otherwise. They are not vendor-published or independently benchmarked.

Improve them. See CONTRIBUTING.md. A PR that adds a source is worth more than a PR that just changes a number.

License

MIT.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voice_latency-0.1.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voice_latency-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file voice_latency-0.1.1.tar.gz.

File metadata

  • Download URL: voice_latency-0.1.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for voice_latency-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9c95226bbdda8706e68418c1369b5126f1e9fe112550dc3fd1ec75abce29586a
MD5 af1c5a456b2e346cfe8b0c1c3aa6a18c
BLAKE2b-256 32245778e41b425dfa90b55070b73944cd2622d5d0c29f06fc0bea6fff51edf1

See more details on using hashes here.

Provenance

The following attestation bundles were made for voice_latency-0.1.1.tar.gz:

Publisher: publish.yml on mahimailabs/voice-latency

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file voice_latency-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: voice_latency-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for voice_latency-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc077ce1a668c45286953d32ec655df1621a1f8b30b9de0a68ae2992d74ed3df
MD5 0dd88ce096744187857d949388615f63
BLAKE2b-256 3ad6bcdfebe97440fcc4385702736e729b07e020825dcdf5e0855b4cb57c5d82

See more details on using hashes here.

Provenance

The following attestation bundles were made for voice_latency-0.1.1-py3-none-any.whl:

Publisher: publish.yml on mahimailabs/voice-latency

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page