Class OpenAIRealtimeTranscriptionSTT

Streaming STT provider for OpenAI's Realtime transcription sessions. Implements IStreamingSTT for use with VoicePipelineOrchestrator and StreamingSTTChain, both exported from @framers/agentos/io/voice-pipeline.

Example

const stt = new OpenAIRealtimeTranscriptionSTT({
apiKey: process.env.OPENAI_API_KEY!,
model: 'gpt-4o-mini-transcribe',
usageIntervalMs: 15_000,
});
const session = await stt.startSession({ language: 'en-US' });
session.on('transcript', (event) => console.log(event.itemId, event.isFinal, event.text));
session.on('usage', (usage) => console.log(usage.connectionIndex, usage.audioSeconds));

Implements

  • IStreamingSTT
  • HealthyProvider

Constructors

Methods

  • Opens a transcription session on a fresh key from the pool. Resolves once OpenAI has confirmed the session update; rejects (with no retry) when the first connection cannot open, so a StreamingSTTChain (exported from @framers/agentos/io/voice-pipeline) falls back. A first connection that closes as its session update is confirmed is replaced by the retry rules first: this resolves once the replacement is open, and rejects with the error that ends the retries.

    Parameters

    • Optional config: StreamingSTTConfig

    Returns Promise<StreamingSTTSession>

Properties

providerId: "openai-realtime-transcription" = 'openai-realtime-transcription'
isStreaming: true = true
priority: number
capabilities: ProviderCapabilities