Skip to content

Realtime providers

A realtime provider is a single speech-to-speech model that takes audio in and streams audio out — no separate STT or TTS. In Syrinx you wrap one in a RealtimeBridge, which runs it as a plugin and gives you the same tools, resume, and observability surface as a cascade.

import { RealtimeBridge, fromOpenAIRealtime } from '@kuralle-syrinx/realtime';
session.registerPlugin('realtime', new RealtimeBridge(fromOpenAIRealtime({ apiKey, socketFactory })));

Run the session with endpointingOwner: "timer" — a realtime model owns its own turn detection, so you don’t register STT/VAD/TTS plugins.

import { fromOpenAIRealtime } from '@kuralle-syrinx/realtime';
const adapter = fromOpenAIRealtime({
apiKey: process.env.OPENAI_API_KEY!,
socketFactory: createNodeWsSocket,
model: 'gpt-realtime',
});
OptionNotes
apiKeyRequired.
modelThe OpenAI Realtime model id.
socketFactorycreateNodeWsSocket on Node, createWorkersSocket on the edge.
toolsFunction tools the model can call — see delegating to a reasoner.

On resume, OpenAI replays the transcript into the model (conversation.item.create) so a hibernated call picks back up with full context.

import { fromGeminiLive } from '@kuralle-syrinx/realtime';
const adapter = fromGeminiLive({
apiKey: process.env.GEMINI_API_KEY!,
socketFactory: createNodeWsSocket,
systemInstruction: 'You are a helpful voice assistant.',
});
OptionNotes
apiKeyRequired.
modelThe Gemini Live model id.
systemInstructionSystem prompt.
toolsFunction tools.

Gemini Live resumes natively from its own session handle — Syrinx passes the handle through rather than replaying the transcript, so there’s no double-applied history.

Grok’s realtime API is OpenAI-compatible, so it uses the same adapter shape:

import { fromGrokRealtime } from '@kuralle-syrinx/grok';
const adapter = fromGrokRealtime({ apiKey: process.env.XAI_API_KEY!, socketFactory });

Half-cascade: realtime reasoning, your own TTS voice

Section titled “Half-cascade: realtime reasoning, your own TTS voice”

If you want a realtime front’s reasoning but a specific TTS voice or language, run the front text-only and let a Syrinx TTS plugin speak its transcript. Set the text-only modality on the adapter and register a TTS plugin instead of relying on the front’s audio out. This pairs a strong reasoning front with the TTS provider of your choice.