Skip to content

bodhi-realtime-agent / OpenAIRealtimeWhisperConfig

Interface: OpenAIRealtimeWhisperConfig ​

Defined in: src/transport/openai-realtime-whisper-stt-provider.ts:27

Streaming STT provider backed by OpenAI's gpt-realtime-whisper model.

Opens a WebSocket to /v1/realtime?intent=transcription and runs a transcription-only session (session.type = 'transcription') — distinct from the voice-agent session used by OpenAIRealtimeTransport. Useful as:

  1. A drop-in sttProvider in agent mode (alongside any LLM transport).
  2. The transcription-mode target for VoiceSession.setTranscriptionMode when paired with any LLMTransport (cross-provider supported).

The provider itself does not resample. configure() accepts only PCM16 @ 24 kHz mono and throws otherwise — VoiceSession is the single resample point in the framework (see design-openai-realtime-transport-v2.md §1.3 "Resampling ownership").

Turn attribution uses the server-issued item_id (via input_audio_buffer.committed) rather than naive FIFO of commit() calls, because OpenAI Realtime does not guarantee ordering across overlapping turns or interleaved partial/final events.

Properties ​

apiKey ​

apiKey: string

Defined in: src/transport/openai-realtime-whisper-stt-provider.ts:29

OpenAI API key. Required.


language? ​

optional language?: string

Defined in: src/transport/openai-realtime-whisper-stt-provider.ts:33

BCP-47 language hint. Optional.


model? ​

optional model?: string

Defined in: src/transport/openai-realtime-whisper-stt-provider.ts:31

Model identifier. Default: 'gpt-realtime-whisper'.


turnDetection? ​

optional turnDetection?: Record<string, unknown> | null

Defined in: src/transport/openai-realtime-whisper-stt-provider.ts:36

Server VAD config passed through to session.audio.input.turn_detection. Default { type: 'server_vad' }.

Built with VitePress