Skip to content

Release Notes: v0.14.0

Release Date: 2026-06-15

Summary

Adds Gateway and Realtime provider registries to the global registry system, enabling provider discovery and side-effect registration for voice gateways (Twilio, Telnyx) and native voice-to-voice providers (OpenAI Realtime, Gemini Live).

What Changed

Gateway Provider Registry

New registry functions for voice gateway providers:

import (
    omnivoice "github.com/plexusone/omnivoice-core"
    "github.com/plexusone/omnivoice-core/registry"
    _ "github.com/plexusone/omni-twilio/omnivoice/gateway"  // Auto-registers "twilio"
)

// Get registered gateway provider
gateway, err := omnivoice.GetGatewayProvider("twilio",
    registry.WithAccountSID(os.Getenv("TWILIO_ACCOUNT_SID")),
    registry.WithAuthToken(os.Getenv("TWILIO_AUTH_TOKEN")),
    registry.WithPhoneNumber("+15551234567"),
    registry.WithPublicURL("https://example.ngrok.io"),
)

// List available gateway providers
names := omnivoice.ListGatewayProviders()  // ["twilio", "telnyx"]

// Check if provider exists
if omnivoice.HasGatewayProvider("twilio") {
    // ...
}

Realtime Provider Registry

New registry functions for native voice-to-voice providers:

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

// Get registered realtime provider
realtime, err := omnivoice.GetRealtimeProvider("openai",
    registry.WithAPIKey(os.Getenv("OPENAI_API_KEY")),
    registry.WithModel("gpt-4o-realtime-preview"),
    registry.WithVoice("alloy"),
    registry.WithInstructions("You are a helpful assistant."),
)

// List available realtime providers
names := omnivoice.ListRealtimeProviders()  // ["openai", "gemini"]

// Check if provider exists
if omnivoice.HasRealtimeProvider("gemini") {
    // ...
}

New Registry Interfaces

The registry package now includes interfaces for Gateway and Realtime providers:

// Gateway interface for voice gateways (PSTN, WebRTC)
type Gateway interface {
    Name() string
    Start(ctx any) error
    Stop() error
}

// RealtimeProvider interface for native voice-to-voice
type RealtimeProvider interface {
    Name() string
    Close() error
}

// Factory types
type GatewayProviderFactory func(config ProviderConfig) (Gateway, error)
type RealtimeProviderFactory func(config ProviderConfig) (RealtimeProvider, error)

New Provider Options

Additional ProviderOption functions for gateway and realtime configuration:

Option Description
WithListener(net.Listener) Pre-configured listener for gateway servers
WithPublicURL(string) Public URL for webhook callbacks
WithListenAddr(string) Address for gateway server to listen on
WithConnectionID(string) Connection ID for Telnyx gateways
WithVoice(string) Voice selection for realtime providers
WithModel(string) Model selection for realtime providers
WithInstructions(string) System instructions for realtime providers

Use Cases

Unified Provider Discovery

Applications can now discover all available voice providers:

func printAvailableProviders() {
    fmt.Println("STT Providers:", omnivoice.ListSTTProviders())
    fmt.Println("TTS Providers:", omnivoice.ListTTSProviders())
    fmt.Println("Gateway Providers:", omnivoice.ListGatewayProviders())
    fmt.Println("Realtime Providers:", omnivoice.ListRealtimeProviders())
}

Side-Effect Registration

Provider packages auto-register via init():

// In omni-twilio/omnivoice/gateway/init.go
func init() {
    omnivoice.RegisterGatewayProvider("twilio", NewGatewayProvider, omnivoice.PriorityThick)
}

// In omni-openai/omnivoice/realtime/init.go
func init() {
    omnivoice.RegisterRealtimeProvider("openai", NewRealtimeProvider, omnivoice.PriorityThick)
}

Dynamic Provider Selection

func createRealtimeProvider(name string, apiKey string) (registry.RealtimeProvider, error) {
    if !omnivoice.HasRealtimeProvider(name) {
        return nil, fmt.Errorf("unknown realtime provider: %s", name)
    }
    return omnivoice.GetRealtimeProvider(name,
        registry.WithAPIKey(apiKey),
    )
}

Installation

go get github.com/plexusone/omnivoice-core@v0.14.0

Migration Guide

From v0.13.x

No breaking changes. All existing code continues to work.

New functionality is additive:

// New: Gateway provider registry
omnivoice.RegisterGatewayProvider("custom", factory, omnivoice.PriorityThick)
gateway, _ := omnivoice.GetGatewayProvider("twilio", opts...)

// New: Realtime provider registry
omnivoice.RegisterRealtimeProvider("custom", factory, omnivoice.PriorityThick)
realtime, _ := omnivoice.GetRealtimeProvider("openai", opts...)

// New: Provider options for gateway/realtime
registry.WithPublicURL("https://example.com")
registry.WithVoice("alloy")
registry.WithModel("gpt-4o-realtime-preview")
registry.WithInstructions("System prompt here")

Full Changelog

See CHANGELOG.md for the complete list of changes.