{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "openspline-openspline--put-face-on-openai-realtime-agent",
 "repo": "openspline/openspline",
 "repo_url": "https://github.com/openspline/openspline",
 "repo_slug": "openspline-openspline",
 "title": "Put a face on an OpenAI Realtime agent",
 "page_title": "How to put a face on an OpenAI Realtime agent with Openspline",
 "summary": "Wrap an existing OpenAI Realtime connection so the avatar speaks its replies.",
 "who": "A developer whose agent already uses the OpenAI Realtime API and needs a visual avatar without rewriting event handling.",
 "problem": "A Realtime agent plays audio only, and wiring audio to a video avatar by hand is error prone.",
 "outcome": "The existing Realtime event handler keeps working while the avatar speaks the agent's audio.",
 "steps": [
  "Run `pip install openai==2.54.0`.",
  "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()`.",
  "Create `adapter = OpenAIRealtime(avatar, connection)` and loop over `adapter.wrap(connection)`, passing each event to your handler.",
  "Disable your previous speaker output so audio does not play twice, then run `OPENAI_API_KEY=... python examples/python/openai_realtime.py portrait.jpg`."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "60 minutes",
 "basis": "readme",
 "caveat": "The README pins openai==2.54.0 for this connector, so newer SDK versions may not match the example.",
 "category": "Content",
 "tags": [
  "Content"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Keep OPENAI_API_KEY on the backend and never expose it to the browser."
  }
 ],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/openspline-openspline/put-face-on-openai-realtime-agent/",
 "md": "https://dedupedai.com/use-cases/openspline-openspline/put-face-on-openai-realtime-agent/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/openspline-openspline--put-face-on-openai-realtime-agent.json",
 "api_version": "v1"
}
