Skip to content

v0.5.0

Release Date: 2026-01-04

OmniVoice provider integration.

Highlights

This release adds OmniVoice provider implementations, enabling go-elevenlabs to be used with the OmniVoice abstraction layer for vendor-agnostic voice AI applications.

New Features

OmniVoice Provider Integration

The new omnivoice/ subpackage implements OmniVoice interfaces using the ElevenLabs API:

Package Interface Description
omnivoice/tts tts.Provider, tts.StreamingProvider Text-to-speech synthesis
omnivoice/stt stt.Provider, stt.StreamingProvider Speech-to-text transcription
omnivoice/agent agent.Provider Real-time voice agent sessions

Usage:

import (
    "github.com/agentplexus/omnivoice/tts"
    eleventts "github.com/agentplexus/go-elevenlabs/omnivoice/tts"
)

// Create ElevenLabs TTS provider
provider, err := eleventts.New()
if err != nil {
    log.Fatal(err)
}

// Use with OmniVoice client
client := tts.NewClient(provider)
result, err := client.Synthesize(ctx, "Hello world", tts.SynthesisConfig{
    VoiceID: "21m00Tcm4TlvDq8ikWAM",
})

STT Example:

import (
    elevenstt "github.com/agentplexus/go-elevenlabs/omnivoice/stt"
)

provider, _ := elevenstt.New()

// Batch transcription
result, err := provider.Transcribe(ctx, audioData, stt.TranscriptionConfig{
    Language: "en",
})

// Streaming transcription
writer, events, err := provider.TranscribeStream(ctx, stt.TranscriptionConfig{})
go func() {
    for event := range events {
        fmt.Println(event.Transcript)
    }
}()
writer.Write(audioChunk)
writer.Close()

Agent Session Example:

import (
    elevenagent "github.com/agentplexus/go-elevenlabs/omnivoice/agent"
)

provider, _ := elevenagent.New()

session, err := provider.CreateSession(ctx, agent.Config{
    VoiceID:  "21m00Tcm4TlvDq8ikWAM",
    Language: "en",
})

session.Start(ctx)
defer session.Stop(ctx)

// Send/receive audio
session.SendAudio(micData)
for audio := range session.ReceiveAudio() {
    playAudio(audio)
}

New Examples

Added example programs for debugging and basic TTS usage:

  • examples/debug-test/ - HTTP debugging utilities for API troubleshooting
  • examples/simple/ - Basic TTS generation example

Installation

go get github.com/agentplexus/go-elevenlabs@v0.5.0

Upgrade Notes

This release is backward compatible. The new omnivoice/ packages are optional - existing code continues to work unchanged.

To use OmniVoice integration, import the specific provider packages you need:

import "github.com/agentplexus/go-elevenlabs/omnivoice/tts"
import "github.com/agentplexus/go-elevenlabs/omnivoice/stt"
import "github.com/agentplexus/go-elevenlabs/omnivoice/agent"