Open-source profiler tracks cost and speed of voice agent calls

built on LiveKit or Pipecat route every conversational turn through three separate services: (STT), an LLM, and (TTS). Each comes from a different vendor with its own bill, making it hard to tell which one is driving up costs. VoiceGateway is a new open-source profiler built to solve this.

Adding a single line of code, voicegateway.attach(session), instruments every STT, LLM, and TTS call so that cost and timing are tracked automatically. It records cost broken down by provider and model, latency at p50 and p95 (the typical response time and the slower tail among the top 5% of requests), lets you replay individual calls, and includes a guard() feature that enforces a daily budget cap with automatic fallback to another provider once the cap is hit. It runs using your own API keys, and only collects usage telemetry — audio itself never passes through it.

The project is released under the MIT license and works with any provider. The repository is mahimailabs/voicegateway, and the creator is asking what additional per-call data people would want tracked, and whether others are also struggling with across multiple voice providers.

Key points

  • Single line of code (voicegateway.attach(session)) instruments LiveKit/Pipecat
  • Tracks cost and latency (p50/p95) broken down by provider and model
  • Supports per-call replay and a guard() feature for daily budget caps with automatic fallback
  • with your own API keys; collects only telemetry, never audio
  • and open source, hosted at mahimailabs/voicegateway
Read original