Skip to main content
Applies to:


Summary

The x-bt-compress-audio header controls audio storage format in Braintrust logs without affecting real-time audio quality between clients and OpenAI. Audio compression occurs at storage time, not proxy time, meaning the proxy passes audio data unmodified while only compressing what gets stored in Braintrust for cost optimization.

How It Works

When using the x-bt-compress-audio header with OpenAI Realtime API requests through the Braintrust AI Proxy, audio compression happens after network capture but before writing to storage. The audio flow works as follows:
  • Client ↔ Proxy ↔ OpenAI: Uncompressed audio (no quality or latency impact)
  • Proxy → Braintrust Storage: Compressed as MP3 when header is present, otherwise stored as WAV
This means real-time audio quality and latency remain unchanged for end users, while storage costs can be reduced by using compressed audio logs. Omitting the header stores uncompressed WAV files for higher fidelity log analysis.