OmniAvatar Core¶
Provider-agnostic AI avatar interfaces for Go — no provider dependencies.
omniavatar-core defines the interfaces for working with AI avatar
vendors, across two surfaces, without pulling in any provider SDK:
live— real-time streaming avatar sessions (rooms, PCM audio streaming for lip-sync) for conversational agentsrender— asynchronous batch avatar video generation (narration audio in, talking-head MP4 out) for offline pipelines
For a batteries-included package with all providers wired up, use omniavatar.
When to Use Which¶
| Import | Use when |
|---|---|
omniavatar-core |
You accept avatars as an interface (library code, consumers) — zero provider dependencies |
omniavatar |
You construct providers — pulls in provider SDKs and LiveKit |
Installation¶
Usage¶
Import only the interfaces:
import (
"github.com/plexusone/omniavatar-core/live"
"github.com/plexusone/omniavatar-core/render"
)
func processAvatar(session live.Session) error {
audioOut := session.AudioOutput()
return audioOut.CaptureFrame(ctx, pcmData)
}
Import with all providers (batteries-included):
import (
"github.com/plexusone/omniavatar"
_ "github.com/plexusone/omniavatar/providers/all"
)
liveProvider, err := omniavatar.GetLiveProvider("heygen",
omniavatar.WithAPIKey(os.Getenv("LIVEAVATAR_API_KEY")),
omniavatar.WithExtension("avatar_id", avatarID),
)
renderProvider, err := omniavatar.GetRenderProvider("heygen",
omniavatar.WithAPIKey(os.Getenv("HEYGEN_API_KEY")),
)
Documentation¶
- Live interfaces —
Provider,Session,AudioDestination - Render interfaces —
Provider,AudioUploader,Wait - Architecture — the core / batteries-included split and registry pattern
- API reference on pkg.go.dev — full godoc