DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to add an avatar to a LiveKit voice agent with Openspline

Attach an avatar to your AgentSession so it plays in your normal LiveKit frontend.

Short answer: Run pip install 'livekit-agents[openai]==1.8.3'; then set OPENAI_API_KEY, LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET; create avatar = AvatarSession("portrait.jpg", client=Openspline(quality="low")) and call await avatar.start(agent_session, room=ctx.room) before your existing session starts. All steps.

  • Content
  • Advanced
  • 90 minutes
  • From the README
  • Any agent

Authorization notice. Openspline is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

Credentials. LiveKit API secret and OpenAI key must stay on the server side of the agent.

Who it is forA team running a LiveKit voice agent that needs a face shown inside its existing room frontend.

The problemLiveKit rooms carry audio only, so the agent has no visible presence for participants.

The outcomeThe avatar appears in the same LiveKit room as the agent, driven by its audio.

What you need first

  • A portrait image of the face to animate, with rights to use it
  • Python 3.x or Node 20+ for the SDK
  • Either an OpenSpline Cloud API key or a Linux or WSL2 machine with an NVIDIA GPU
  • An existing voice AI agent or a TTS provider that outputs PCM audio

Steps

  1. Run pip install 'livekit-agents[openai]==1.8.3'.
  2. Set OPENAI_API_KEY, LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET.
  3. Create avatar = AvatarSession("portrait.jpg", client=Openspline(quality="low")) and call await avatar.start(agent_session, room=ctx.room) before your existing session starts.
  4. Run PORTRAIT=portrait.jpg python examples/python/livekit_agent.py dev.
  5. Join the room from your normal LiveKit frontend and confirm the avatar speaks.

Prompt for your agent

Use the openspline repo (github.com/openspline/openspline) to attach an AvatarSession to the LiveKit agent in <path-to-agent>, using portrait <path-to-portrait.jpg>. Start the avatar before agent_session.start and confirm the avatar is visible in the room.

Caveat. The README says the native service includes LiveKit support, so check that your setup uses that service before relying on this connector.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for openspline/openspline and "Add an avatar to a LiveKit voice agent"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer