Skip to main content
Version: Latest

AI Human Web SDK v2

Add a real‑time, talking AI avatar to any web page. The v2 SDK streams a 2D avatar that speaks your text (or LLM responses) with natural lip‑sync — no video pipeline, no plugins.

Install with npm (@deepbrainai/aihuman-web-sdk). The AIPlayer API matches v1 for the calls you need day to day. Existing v1 integrations can stay on Web SDK v1.

Talk to AI Human

Try it live — type a message and the avatar speaks it back with real‑time lip‑sync. This demo runs on the published SDK exactly as you would integrate it.

Why v2

  • npm. npm install @deepbrainai/aihuman-web-sdk, then new AIPlayer(el).
  • Real‑time speech. Send text and the avatar speaks it back with lip‑sync, streaming.
  • Faster first render. Optional enableEarlyStart shows the avatar sooner.
  • Mobile‑optimized automatically. On phones the SDK trims the idle background download so the avatar appears faster — no code change required.
  • Familiar API. The core AIPlayer class mirrors v1 — most calls carry over. (3D and custom‑voice APIs are removed; see the comparison below.)

How it works

If the session JWT expires, keep the player on screen, call generateToken() with a new ClientToken, then reconnect(). The SDK continues the same session. Call release() only when the user closes the avatar — the next init() starts a new session.

What's different from v1

Web SDK v1Web SDK v2
Rendering2D / 3D2D only
DistributionCDN aiPlayer-1.6.x.min.jsnpm @deepbrainai/aihuman-web-sdk
Custom voiceyesremoved
Faster first renderenableEarlyStart
Mobile idle downloadfullauto‑trimmed
API surfaceAIPlayer classsame AIPlayer class

Next steps