Skip to content

bodhi-realtime-agent / OpenAIRealtimeAudioFormat

Interface: OpenAIRealtimeAudioFormat ​

Defined in: src/transport/openai-realtime-models.ts:39

Audio format on the OpenAI Realtime wire.

Properties ​

rate? ​

optional rate?: number

Defined in: src/transport/openai-realtime-models.ts:50

Sample rate in Hz. Constrained at runtime:

  • For audio/pcm, OpenAI Realtime only accepts 24000. Other values throw FrameworkError('UNSUPPORTED_SAMPLE_RATE') from buildSessionConfig().
  • For audio/pcmu, always 8000 — rate is ignored if supplied. Defaults: 24000 (pcm) / 8000 (pcmu).

type ​

type: "audio/pcm" | "audio/pcmu"

Defined in: src/transport/openai-realtime-models.ts:43

'audio/pcm' is signed 16-bit linear; 'audio/pcmu' is G.711 μ-law for telephony bridges. A-law ('audio/pcma') is future work — src/telephony/audio-codec.ts only ships μ-law encode/decode today.

Built with VitePress