Security And Cost

Security and cost

Cost protection

Stratis Voice has five layers of protection against runaway transcription bills.

Layer 1: Voice activity detector

Background noise, coughs, clicks, music: all rejected before audio is ever uploaded. Players have to actually speak to trigger a request.

Layer 2: Per-player rate limit

Configurable. Default: 12 transcriptions per minute, with a minimum 750ms gap between requests.

Layer 3: Per-player daily cap

Default 50 transcriptions per player per day. Set ServerConfig.GroqDailyPerPlayer to change.

Layer 4: Server-wide daily cap

Default 2000 transcriptions across all players per day. Set ServerConfig.GroqDailyTotal to your budget. Free tier is 2000/day, so leaving this at 2000 keeps you on the free plan forever.

Layer 5: Concurrency cap

Maximum 8 simultaneous in-flight requests, with a queue of 40 more. Anything beyond is rejected immediately so 100 players hammering at once cannot blow past API rate limits.

Anti-abuse

Replay protection

Every audio upload gets a fingerprint (length + first 200 chars + last 200 chars of base64). The same fingerprint from the same player within 60 seconds is rejected as a duplicate. This catches scripted spam and replay attacks.

Token security

Your API token never leaves the server. Even if your script is leaked or decompiled, the token is in a server-only config file that clients never see.

Audio size cap

Maximum 1.5MB base64 per upload (about 24 seconds of 16kHz audio). Larger uploads are rejected.

Approval gating

Player must have approved microphone access on the client. Server checks this before accepting any audio.

Cost math

Whisper Large V3 Turbo costs about $0.04 per audio hour on the underlying provider.

Real-world numbers:

  • 5 second average utterance, 30 commands per player per session
  • 4 hour session, 1 player: ~$0.005
  • 4 hour session, 32 players: ~$0.16
  • 32 players, 4 hours/day, 30 days: ~$5/month

Free tier covers 2000 requests per day. Most servers stay free indefinitely.

Quota tracking

The server keeps a daily counter per player identifier (license:) in groq_usage.json. The file is created automatically and resets at midnight server time.

Run stratisvoice_quota in your server console to see current usage:

day=2026-04-28 total=47
  license:abc123 = 12
  license:def456 = 8
  license:xyz789 = 27

View Rivo Voice