Applies to:
Summary
Thex-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 thex-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