Skip to content

Release Notes: v0.4.0

Release Date: 2026-06-15

Highlights

  • Registry Integration: Auto-register OpenAI Realtime provider with omnivoice-core
  • Type-Safe Options: Provider-specific configuration via registry options

New Features

Registry Integration

The OpenAI Realtime provider now registers with omnivoice-core's provider registry, enabling automatic discovery via side-effect imports:

import (
    omnivoice "github.com/plexusone/omnivoice-core"
    "github.com/plexusone/omnivoice-core/registry"
    _ "github.com/plexusone/omni-openai/omnivoice/realtime" // Auto-register
)

// Get realtime provider via registry
provider, err := omnivoice.GetRealtimeProvider("openai",
    registry.WithAPIKey(os.Getenv("OPENAI_API_KEY")),
    registry.WithModel("gpt-4o-realtime-preview-2024-12-17"),
    registry.WithVoice("alloy"),
    registry.WithInstructions("You are a helpful assistant."),
)
if err != nil {
    log.Fatal(err)
}

// Access underlying provider for full API
wrapper := provider.(*realtime.RealtimeWrapper)
openaiProvider := wrapper.Provider()

Type-Safe Registry Options

Provider-specific options for OpenAI Realtime configuration:

import "github.com/plexusone/omni-openai/omnivoice/realtime"

provider, err := omnivoice.GetRealtimeProvider("openai",
    registry.WithAPIKey(os.Getenv("OPENAI_API_KEY")),
    // Type-safe OpenAI-specific options
    realtime.WithRegistryTools(tools),
    realtime.WithRegistryTurnDetection(turnDetectionConfig),
    realtime.WithRegistryInputAudioFormat("pcm16"),
    realtime.WithRegistryOutputAudioFormat("pcm16"),
    realtime.WithRegistryModalities([]string{"text", "audio"}),
    realtime.WithRegistryTemperature(0.8),
    realtime.WithRegistryMaxResponseOutputTokens(4096),
)

Enhanced Factory

The realtime factory now handles typed extensions:

  • tools - []Tool for function calling
  • turnDetection - *TurnDetectionConfig for VAD settings
  • inputAudioFormat, outputAudioFormat - Audio format selection
  • modalities - []string for output modes
  • temperature - Generation temperature
  • maxResponseOutputTokens - Output limits

Dependencies

Package Version Notes
github.com/plexusone/omnivoice-core v0.14.0 Updated from v0.12.1

Installation

go get github.com/plexusone/omni-openai@v0.4.0

Migration Guide

From v0.3.0

No breaking changes. All existing code continues to work.

New optional capability: use the registry pattern instead of direct construction:

// Before (still works)
provider := realtime.NewProvider(apiKey, opts...)

// After (optional registry pattern)
import _ "github.com/plexusone/omni-openai/omnivoice/realtime"
provider, err := omnivoice.GetRealtimeProvider("openai", opts...)

Full Changelog

See CHANGELOG.md for the complete list of changes.