Release Notes: v0.11.0¶
Release Date: 2026-06-15
Highlights¶
- Realtime Factory API: Get realtime provider factories by name without direct imports
- Gateway Tool Types: Generic tool definition and handler types for voice gateways
- Transitive Dependency Support: Consumers can use omnivoice as their sole dependency for gateway tools and realtime factories
New Features¶
Realtime Factory API¶
Get realtime provider factories by name, enabling consumers to avoid direct imports of provider packages:
import "github.com/plexusone/omnivoice"
// Get factory by name (no direct import of omni-openai or omni-google needed)
factory, err := omnivoice.GetRealtimeFactory("openai")
if err != nil {
log.Fatal(err)
}
// List available factories
fmt.Println(omnivoice.ListRealtimeFactories()) // [openai gemini]
// Check if factory exists
if omnivoice.HasRealtimeFactory("gemini") {
// ...
}
// Panic variant for static configuration
factory := omnivoice.MustGetRealtimeFactory("openai")
| Function | Description |
|---|---|
GetRealtimeFactory(name) |
Get factory by name, returns error if not found |
MustGetRealtimeFactory(name) |
Get factory by name, panics if not found |
ListRealtimeFactories() |
Returns ["openai", "gemini"] |
HasRealtimeFactory(name) |
Check if factory is available |
Gateway Tool Types¶
Generic types for defining tools that work with any gateway provider:
import "github.com/plexusone/omnivoice"
// Define tools using generic types
tools := []omnivoice.ToolDefinition{
{
Name: "lookup_customer",
Description: "Look up customer by phone number",
Parameters: map[string]any{
"type": "object",
"properties": map[string]any{
"phone": map[string]any{"type": "string"},
},
"required": []string{"phone"},
},
},
}
// Define handlers
handlers := map[string]omnivoice.ToolHandler{
"lookup_customer": func(ctx context.Context, args map[string]any) (string, error) {
phone := args["phone"].(string)
return fmt.Sprintf("Customer: John Doe (%s)", phone), nil
},
}
| Type | Description |
|---|---|
ToolDefinition |
Generic tool definition (name, description, parameters) |
ToolHandler |
Function signature for tool handlers |
Gateway Configuration Options¶
Provider options for configuring tools and realtime settings on gateways:
import (
"github.com/plexusone/omnivoice"
"github.com/plexusone/omnivoice-core/registry"
_ "github.com/plexusone/omnivoice/providers/all"
)
opts := []registry.ProviderOption{
// Standard gateway options...
registry.WithAccountSID(accountSID),
registry.WithAuthToken(authToken),
// Tool configuration via omnivoice
omnivoice.WithGatewayTools("twilio", tools),
omnivoice.WithGatewayToolHandlers("twilio", handlers),
// Realtime configuration via omnivoice
omnivoice.WithRealtimeFactory(factory),
omnivoice.WithGatewayRealtimeConfig(&gateway.RealtimeConfig{
Provider: "openai",
APIKey: apiKey,
Model: "gpt-4o-realtime-preview",
Voice: "alloy",
}),
}
gw, err := omnivoice.GetGatewayProvider("twilio", opts...)
| Function | Description |
|---|---|
WithGatewayTools(provider, tools) |
Configure tools for a gateway |
WithGatewayToolHandlers(provider, handlers) |
Configure tool handlers for a gateway |
WithRealtimeFactory(factory) |
Configure realtime provider factory |
WithGatewayRealtimeConfig(config) |
Configure realtime settings |
Benefits¶
Transitive Dependencies¶
With these additions, consumers can use omnivoice as their sole voice dependency:
Before v0.11.0:
import (
"github.com/plexusone/omnivoice"
openaiRealtime "github.com/plexusone/omni-openai/omnivoice/realtime"
twilioGateway "github.com/plexusone/omni-twilio/omnivoice/gateway"
)
// Direct provider imports required
factory := openaiRealtime.NewFactory()
tools := []twilioGateway.ToolDefinition{...}
After v0.11.0:
import "github.com/plexusone/omnivoice"
// No direct provider imports needed
factory, _ := omnivoice.GetRealtimeFactory("openai")
tools := []omnivoice.ToolDefinition{...}
This reduces go.mod complexity and ensures provider versions stay in sync.
Installation¶
Full Changelog¶
See CHANGELOG.md for the complete list of changes.