Skip to main content

The open-source profiler for voice agents. Voice AI vendors hide three numbers: whether a call worked, what it cost, and how to make it cheaper. Add one line and VoiceGateway prices and times every STT, LLM and TTS call in your LiveKit or Pipecat agent. Self-hosted, on your own keys.

from livekit.agents import AgentSession
from livekit.plugins import cartesia, deepgram, openai
import voicegateway

session = AgentSession(
    stt=deepgram.STT(model="nova-3"),
    llm=openai.LLM(model="gpt-4.1-mini"),
    tts=cartesia.TTS(model="sonic-3"),
)
voicegateway.attach(session)

Every call then lands as a row you can read, per stage and in total (example numbers):

call 8f2c   STT  deepgram/nova-3       0.95 audio min      $0.00456
            LLM  openai/gpt-4.1-mini   1,320 in, 220 out   $0.00088
            TTS  cartesia/sonic-3      860 chars           $0.03440
            total $0.03984 · 640 ms to first audio
Using Pipecat? Same one line.
from pipecat.pipeline.task import PipelineTask
import voicegateway

task = PipelineTask(pipeline)
voicegateway.attach(task)

Quick start

pip install "voicegateway[livekit,dashboard]"   # or [pipecat,livekit,dashboard]
voicegw init && voicegw serve                    # dashboard at http://localhost:8080

Add the attach() line to your agent and run one call. VoiceGateway bundles no provider plugins: it meters the ones you already use. The quickstart walks through a first call end to end. Python 3.11+.

What it does

  • Prices every call by audio seconds, tokens and characters, through voice-prices. How attach works
  • Checks itself against your invoices. voicegw reconcile compares recorded cost with a provider's usage export. Costs and reconciliation
  • Controls spend. guard() wraps one provider with a daily budget, fallback and rate limit, and returns the same type. guard()
  • Collects a fleet. One collector on your own server, every agent pushes to it. Self-hosting
  • Talks to coding agents. An MCP server lets Claude Code, Cursor and Codex query costs and calls. MCP

Building a text-only LLM app? LiteLLM is the better fit. VoiceGateway is for agents that listen and speak.

See it first

The VoiceGateway dashboard: cost by provider and model

Click through the real dashboard with example data, no install and no login, at voicegateway.dev/demo.

Contribute in ten minutes

  1. Pick an issue labelled good first issue. Each one names the files, the change and the test.

  2. Comment .take to claim it. First comment wins.

  3. Set up and run the tests:

    git clone https://github.com/mahimailabs/voicegateway && cd voicegateway
    pip install -e ".[dev]" && pytest
    
  4. Open a PR with Closes #<issue>.

CONTRIBUTING.md has the checklist and the deeper guides. Questions go to Discord; security reports go through SECURITY.md.

Contributors

License

MIT. Built in public by Mahimai Raja, on LiveKit Agents, Pipecat and voice-prices.

GitAds Sponsored

Sponsored by GitAds

Metadata

Release files for voicegateway 0.27.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for voicegateway 0.27.1
File Size Uploaded Provenance Actions
voicegateway-0.27.1.tar.gz 2.5 MB Without provenance Details for voicegateway-0.27.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for voicegateway 0.27.1
File Interpreter ABI Platform Actions
voicegateway-0.27.1-py3-none-any.whl Python 3 none any Details for voicegateway-0.27.1-py3-none-any.whl

Total release size: 4.0 MB

Release files / voicegateway-0.27.1.tar.gz

Download URL voicegateway-0.27.1.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
49d4a9de47ae4a92176bd1ea3fcecca945570e9fa568dd3c7b6b83249c29f20f
BLAKE2b-256 checksum
How to use checksums
2108ad51e81564dd428c835edea1855f6189b40ccbfb5126c4d1546d40d27e35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / voicegateway-0.27.1-py3-none-any.whl

Download URL voicegateway-0.27.1-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
60aee8ae5dcb1807239f16d2412a9d653551ea97ee501b4aef6c02a88e8d1ee0
BLAKE2b-256 checksum
How to use checksums
f49f3c8be09611ad332314fe69ed0ce9c18475ebb3e1c2bda6ca9b758262f957
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for voicegateway 0.27.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.27.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page