Capabilities
STT
Whisper and GPT-4o transcription models
LLM
GPT-4o, GPT-4.1, and GPT-3.5 family with full tool-calling support
TTS
Six neural voices via the OpenAI audio API
Realtime
Bidirectional audio session via
gpt-4o-realtime-previewAPI Key
SetOPENAI_API_KEY as an environment variable or pass it inline under api_keys in config.json.
Get your key at platform.openai.com/api-keys.
Quick Config
- config.json
- Environment variable
Available LLM Models
The factory default when
model is empty and llm_provider is "openai" is gpt-3.5-turbo.
Available STT Models
Set via
stt_model in config. The default STT service (stt.NewOpenAI) uses whisper-1 when stt_model is not specified.
TTS Voices
Set via
tts_voice in config. The TTS model (e.g. tts-1, tts-1-hd) can be set via tts_model.
Tool Calling (MCP)
OpenAI is one of two providers in Voxray that implementLLMServiceWithTools. When an MCP server is configured (mcp.command in config), Voxray registers discovered tools with the OpenAI service, and the model can invoke them during a turn.
Tool calls are streamed, accumulated across chunks, executed in index order, and the results are appended to the conversation before a recursive Chat call completes the response. This is fully transparent to the rest of the pipeline.
Realtime Mode
OpenAI Realtime runs a persistent bidirectional audio session usinggpt-4o-realtime-preview. Instead of the STT → LLM → TTS pipeline, audio is streamed directly to OpenAI and responses arrive as audio — significantly reducing first-audio latency.
realtime.NewFromConfig(cfg, "openai") in code; avoid importing the realtime package directly from services to prevent an import cycle. Realtime mode requires a voice-enabled build (CGO_ENABLED=1) when using WebRTC transport.
Configuration Reference
Notes and Limitations
- The factory treats
"openai"as the default LLM and STT provider. Ifprovider,stt_provider,llm_provider, andtts_providerare all unset, Voxray falls back to OpenAI for all three stages. tts-1-hdproduces higher-quality audio at the cost of higher latency;tts-1is recommended for real-time voice.- Tool calling requires
llm_provider: "openai"— it is not available when using the Realtime session path. - Realtime mode and the STT→LLM→TTS pipeline are mutually exclusive per session. Choose one via config.