Skip to main content
VoiceGateway’s conversation replay captures every STT chunk, LLM token, TTS frame, and conversation-state snapshot for a session, when capture is turned on. See CLI: replay for how to enable capture (attach(snapshots=True), LiveKit only, default off) and inspect a captured session. This page surfaces the on-disk storage cost so the trade-off between fidelity and footprint is visible before you set per-project retention.

What gets stored

Four tables (src/voicegateway/models/replay_event_model.py), one row per captured event. Each table serializes its event fields into a single payload TEXT column rather than separate typed columns: replay_stt_events, replay_llm_tokens, and replay_tts_frames also carry id, session_id, t_ms, provider, cost_usd, created_at, tenant_id. replay_state_snapshots is narrower: no provider or cost_usd column. Column overhead runs roughly 80-120 bytes/row; the index on (session_id, t_ms) that each table carries adds an estimated 30-50% on top of payload size.

Per-minute estimate

For a typical voice conversation (caller speaks for half the time, agent for half, normal-cadence LLM with a 500-token system prompt): Total: roughly 130 KB-580 KB per minute of conversation. The floor applies to short, crisp exchanges; the ceiling applies to chatty agents with long conversation histories. The design target of 30-100 KB/min is achievable at the floor; realistic agents will land closer to the ceiling. If you find yourself trending above 500 KB/min consistently, the per-project replay.enabled: false toggle is the fastest mitigation.

Worked example

A solo developer running 100 voice calls per day, averaging 5 minutes each:
At the default 90-day retention:
At AWS S3 standard storage prices (~$0.023/GB-month):
On the local SQLite database (no cloud markup), the cost is the disk byte cost: ~0.01/GBmonthonadeveloperSSD,so 0.01/GB-month on a developer SSD, so ~0.09/month for the same 9 GB. A team agency running 10,000 conversations per day at 3 minutes average scales linearly: ~3 TB at 90-day retention, ~70/monthonS3standardor 70/month on S3 standard or ~30/month on local disk. At that point the retention_days knob matters: dropping to 30 days cuts storage to one-third.

Tuning knobs

Three per-project knobs in voicegw.yaml’s replay: block influence storage: The enabled toggle is the binary on/off. The retention_days knob is the gradient lever. The buffer_size_events and flush_size_events knobs trade off memory pressure and write batching but do not change long-term storage volume.

Dashboard storage view

GET /api/replay/storage returns per-project replay byte totals. The dashboard surfaces this as a breakdown so you see the cost in real time:

Storage

The full SQLite schema including the replay tables.

CLI: replay

Inspect a specific session with voicegw replay.

Cost reconciliation

Verify recorded costs against provider invoices.

Architecture index

Overview of all architecture pages.