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, thennew AIPlayer(el). - Real‑time speech. Send text and the avatar speaks it back with lip‑sync, streaming.
- Faster first render. Optional
enableEarlyStartshows 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
AIPlayerclass 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 v1 | Web SDK v2 | |
|---|---|---|
| Rendering | 2D / 3D | 2D only |
| Distribution | CDN aiPlayer-1.6.x.min.js | npm @deepbrainai/aihuman-web-sdk |
| Custom voice | yes | removed |
| Faster first render | — | enableEarlyStart |
| Mobile idle download | full | auto‑trimmed |
| API surface | AIPlayer class | same AIPlayer class |