Skip to main content

new TalkingAvatar(options)

HTMLElement
required
The element the avatar fills. It needs a width and height; the canvas follows its size.
string
required
Your .glb avatar. See 3D avatars.
Record<string, string | string[]>
Your avatar’s morph names, if they aren’t the standard ones. See Other morph names.
string
default:"DEFAULT_MODEL_URL"
Where to load viseme-model.bin from. See Self-host the model.
number
default:"150"
Delay before an attached stream plays. Lower means less latency and rougher lip sync.
(error: Error) => void
default:"console.error"
Errors from background work (avatar loading, stream analysis).

Members

DEFAULT_MODEL_URL

string: this package version’s copy of the model on jsDelivr.

Example