Skip to main content

Interface: OpenAIRealtimeTranscriptionSTTConfig

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:193

Configuration for the OpenAIRealtimeTranscriptionSTT provider.

Per-session overrides go in StreamingSTTConfig.providerOptions: safetyIdentifier (string) and prompt (string).

Properties​

apiKey​

apiKey: string

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:195

OpenAI API key, or comma-separated keys rotated per session. Sent as a Bearer token on the upgrade.


baseUrl?​

optional baseUrl: string

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:205

Realtime API WebSocket URL, without query parameters. A host other than api.openai.com (an OpenAI-compatible gateway) also gets the model as a model query parameter. The default health probe reads the models endpoint beside it: the same URL over HTTP(S), with a trailing /realtime replaced by /models.

Default Value​

'wss://api.openai.com/v1/realtime'

capabilities?​

optional capabilities: Partial<ProviderCapabilities>

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:258

Optional capability overrides. Merged into defaultCapabilities().


connectTimeoutMs?​

optional connectTimeoutMs: number

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:229

Time a connection has to open and confirm its session update.

Default Value​

10_000

finalTimeoutMs?​

optional finalTimeoutMs: number

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:246

Longest wait for the finals of committed items in flush() and when a connection closes.

Default Value​

5_000

healthProbe()?​

optional healthProbe: (apiKey) => Promise<{ latencyMs: number; ok: boolean; status: number; }>

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:265

Health probe, injectable for tests. Defaults to a GET of the models endpoint on the host baseUrl names (https://api.openai.com/v1/models when it is unset), with the key as a Bearer token.

Parameters​

apiKey​

string

Returns​

Promise<{ latencyMs: number; ok: boolean; status: number; }>


maxBufferedMs?​

optional maxBufferedMs: number

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:243

Audio held while no connection can take it (a reconnect), in milliseconds; older audio is dropped first.

Default Value​

10_000

maxRetries?​

optional maxRetries: number

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:237

Reconnects allowed after consecutive failures before the session ends with an 'error'. The count resets after every final transcript and when a dropped connection had stayed open longer than connectTimeoutMs.

Default Value​

3

model?​

optional model: string

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:208

Transcription model.

Default Value​

'gpt-4o-mini-transcribe'

priority?​

optional priority: number

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:255

Chain priority. Lower values are tried first.

Default​

15

prompt?​

optional prompt: string

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:220

Context for the transcription model, such as vocabulary or the setting.


retryIntervalMs?​

optional retryIntervalMs: number

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:240

Wait before each reconnect after the first, which waits 100 ms.

Default Value​

2_000

rollover?​

optional rollover: false | OpenAIRealtimeTranscriptionRollover

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:252

Rollover settings, or false to keep a single connection.


safetyIdentifier?​

optional safetyIdentifier: string

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:226

Stable, privacy-preserving identifier of the end user (for example a hash of an account id), sent as the OpenAI-Safety-Identifier header.


turnDetection?​

optional turnDetection: OpenAIRealtimeTurnDetection | null

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:217

Server turn detection, or null for none: the caller then ends each turn with flush(), which commits the buffer. Defaults to server turn detection with 600 ms of padding and 350 ms of silence (the LiveKit plugin's values; OpenAI's own defaults are 300 ms and 500 ms), and to null for gpt-live-transcribe and gpt-realtime-whisper, which accept no server turn detection.


usageIntervalMs?​

optional usageIntervalMs: number

Defined in: packages/agentos/src/io/voice-pipeline/providers/OpenAIRealtimeTranscriptionSTT.ts:249

Interval of 'usage' reports for open connections; 0 reports each connection once, when it closes.

Default Value​

0