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

How to put a face on an OpenAI Realtime agent with Openspline

Wrap an existing OpenAI Realtime connection so the avatar speaks its replies.

Short answer: Run pip install openai==2.54.0; then set OPENAI_API_KEY in your backend environment; open the avatar with async with Openspline().avatar("portrait.jpg") as avatar: and wait with await avatar.wait_for_viewer(). All steps.

  • Content
  • Advanced
  • 60 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. Keep OPENAI_API_KEY on the backend and never expose it to the browser.

Who it is forA developer whose agent already uses the OpenAI Realtime API and needs a visual avatar without rewriting event handling.

The problemA Realtime agent plays audio only, and wiring audio to a video avatar by hand is error prone.

The outcomeThe existing Realtime event handler keeps working while the avatar speaks the agent's 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 openai==2.54.0.
  2. Set OPENAI_API_KEY in your backend environment.
  3. Open the avatar with async with Openspline().avatar("portrait.jpg") as avatar: and wait with await avatar.wait_for_viewer().
  4. Create adapter = OpenAIRealtime(avatar, connection) and loop over adapter.wrap(connection), passing each event to your handler.
  5. Disable your previous speaker output so audio does not play twice, then run OPENAI_API_KEY=... python examples/python/openai_realtime.py portrait.jpg.

Prompt for your agent

Use the openspline repo (github.com/openspline/openspline) to add the OpenAIRealtime adapter to the agent in <path-to-agent>, keeping its existing event handler. Use portrait <path-to-portrait.jpg>. Confirm the speaker output is disabled so audio plays once, and report the viewer URL.

Caveat. The README pins openai==2.54.0 for this connector, so newer SDK versions may not match the example.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for openspline/openspline and "Put a face on an OpenAI Realtime 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