OmniVoice¶
Batteries-included voice pipeline framework for Go. Single import, all providers included.
Why OmniVoice?¶
- 🎯 Single Import - One package for all STT, TTS, and telephony needs
- 🗂️ Provider Registry - Get providers by name at runtime
- 🔌 Multiple Providers - OpenAI, ElevenLabs, Deepgram, Twilio, Telnyx
- ⚡ Streaming Support - Real-time transcription and synthesis
- 📞 Voice Calls - Make and receive phone calls with CallSystem
- 💬 SMS - Send text messages via SMSProvider
Quick Example¶
package main
import (
"context"
"log"
"os"
"github.com/plexusone/omnivoice"
_ "github.com/plexusone/omnivoice/providers/all" // Register all providers
)
func main() {
ctx := context.Background()
// Get a TTS provider by name
tts, err := omnivoice.GetTTSProvider("elevenlabs",
omnivoice.WithAPIKey(os.Getenv("ELEVENLABS_API_KEY")))
if err != nil {
log.Fatal(err)
}
// Synthesize speech
result, err := tts.Synthesize(ctx, "Hello, world!", omnivoice.SynthesisConfig{
VoiceID: "pNInz6obpgDQGcFmaJgB",
})
if err != nil {
log.Fatal(err)
}
// result.Audio contains the audio bytes
log.Printf("Generated %d bytes of audio", len(result.Audio))
}
Installation¶
Use Cases¶
| Use Case | Guide | Providers |
|---|---|---|
| Text-to-Speech | TTS Guide | OpenAI, ElevenLabs, Deepgram, Twilio |
| Speech-to-Text | STT Guide | OpenAI, ElevenLabs, Deepgram, Twilio |
| Voice Calls | Voice Calls | Twilio, Telnyx |
| SMS Messaging | SMS Guide | Twilio, Telnyx |
| Real-time Streaming | Streaming | All providers |
| Subtitles | Subtitles | All STT providers |
| Voice Agents | Voice Agents | Combined stack |
Architecture¶
┌─────────────────────────────────────────────────────────────────────────┐
│ OmniVoice │
│ (batteries-included) │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ import _ "github.com/plexusone/omnivoice/providers/all" │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Provider Registry │ │
│ ├─────────────┬─────────────┬─────────────┬───────────────────────┤ │
│ │ TTS │ STT │ CallSystem │ SMSProvider │ │
│ ├─────────────┼─────────────┼─────────────┼───────────────────────┤ │
│ │ elevenlabs │ elevenlabs │ twilio │ twilio │ │
│ │ openai │ openai │ telnyx │ telnyx │ │
│ │ deepgram │ deepgram │ │ │ │
│ │ twilio │ twilio │ │ │ │
│ └─────────────┴─────────────┴─────────────┴───────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Minimal Dependencies Alternative¶
For a minimal dependency footprint, use omnivoice-core with only the providers you need:
import (
"github.com/plexusone/omnivoice-core/tts"
elevenlabs "github.com/plexusone/elevenlabs-go/omnivoice/tts"
)
Next Steps¶
- Getting Started - Detailed setup guide
- Provider Comparison - Choose the right providers
- API Reference - GoDoc