Release Notes: v0.6.0¶
Release Date: 2026-03-21
Highlights¶
- Observability Package: Comprehensive instrumentation for voice operations with hooks and events
- Registry Package: Provider discovery and registration pattern for TTS, STT, and CallSystem
- CallSystem Client: Multi-provider management with automatic failover
- SMS Support: SMSProvider interface for telephony providers
New Packages¶
observability¶
The observability package provides instrumentation interfaces for voice operations:
- VoiceEvent - Lifecycle events (call.initiated, call.answered, call.ended, etc.)
- VoiceObserver - Interface for receiving voice events
- TTSHook/STTHook - Instrumentation hooks for TTS and STT operations
- NoOp implementations - For testing and optional observability
import "github.com/plexusone/omnivoice-core/observability"
// Subscribe to voice events
observer := observability.VoiceObserverFunc(func(ctx context.Context, event observability.VoiceEvent) {
log.Printf("Event: %s, CallID: %s", event.Type, event.CallID)
})
// Emit events
observability.EmitEvent(ctx, observer, observability.EventCallAnswered, callID, "twilio",
observability.WithFrom("+15551234567"),
observability.WithTo("+15559876543"),
)
registry¶
The registry package provides types for provider registration and discovery:
- Registry - Interface for TTS, STT, and CallSystem provider management
- Factory types - Type-safe provider creation functions
- ProviderConfig - Common configuration (APIKey, BaseURL, Extensions)
import "github.com/plexusone/omnivoice-core/registry"
// Register a provider factory
registry.RegisterTTSProvider("elevenlabs", func(cfg registry.ProviderConfig) (tts.Provider, error) {
return elevenlabs.New(cfg.APIKey)
})
// Get a provider
provider, err := registry.GetTTSProvider("elevenlabs", registry.WithAPIKey(apiKey))
New Features¶
CallSystem Client¶
Multi-provider CallSystem client with automatic failover:
import "github.com/plexusone/omnivoice-core/callsystem"
// Create client with multiple providers
client := callsystem.NewClient(twilioProvider, telnyxProvider)
client.SetPrimary("twilio")
client.SetFallbacks("telnyx")
// MakeCall automatically falls back on failure
call, err := client.MakeCall(ctx, "+15559876543")
SMSProvider Interface¶
New interface for SMS messaging support:
import "github.com/plexusone/omnivoice-core/callsystem"
// Providers implementing CallSystem can also implement SMSProvider
type SMSProvider interface {
SendSMS(ctx context.Context, to, body string) (*SMSMessage, error)
SendSMSFrom(ctx context.Context, to, from, body string) (*SMSMessage, error)
}
Observability Integration¶
TTS, STT, and CallSystem now support observability hooks:
// TTS with hook
ttsClient.SetHook(myTTSHook)
// STT with hook
sttClient.SetHook(mySTTHook)
// CallSystem with observer
call, err := provider.MakeCall(ctx, to, callsystem.WithObserver(myObserver))
API Changes¶
New Fields (Backward Compatible)¶
| Package | Type | New Field |
|---|---|---|
tts |
SynthesisConfig |
Hook observability.TTSHook |
stt |
TranscriptionConfig |
Hook observability.STTHook |
callsystem |
CallSystemConfig |
Observer observability.VoiceObserver |
callsystem |
CallOptions |
Observer observability.VoiceObserver |
New Methods¶
| Package | Type | New Methods |
|---|---|---|
tts |
Client |
SetHook(), Hook() |
stt |
Client |
SetHook(), Hook() |
New Types¶
| Package | Type | Description |
|---|---|---|
callsystem |
Client |
Multi-provider client with failover |
callsystem |
SMSProvider |
SMS messaging interface |
callsystem |
SMSMessage |
SMS message type |
callsystem |
ObservableCallSystem |
CallSystem + Observable |
Bug Fixes¶
- Fixed gosec G120 warnings in Twilio webhook example by adding request body limits
Installation¶
Full Changelog¶
See CHANGELOG.md for the complete list of changes.