Skip to content

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 agents
  • render — 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

go get github.com/plexusone/omniavatar-core

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