Web
Stork Live · tested 2026-12-02
Stork Live in a plain web page, from the CDN or from npm.
Before you start
Any web page. Nothing to install: the client loads from a CDN.
Code
<canvas id="avatar"></canvas>
<script type="module">
import { StorkLive } from 'https://cdn.jsdelivr.net/npm/stork-live@0.2/src/stork-live.js'
const live = await StorkLive.mount(document.getElementById('avatar'), { avatar: 'a', siteKey: 'YOUR_SITE_KEY' })
await live.speak(agentAudioTrack) // an audio track, a stream, an <audio> element or an AudioBuffer
</script>speak takes an audio track, a MediaStream, an <audio> element or an AudioBuffer. With a bundler, install the package and import from it:
// npm install stork-live
import { StorkLive } from 'stork-live'Check it works
A face that blinks, with the Powered by stork.ai mark in the corner. When your audio plays, the lips move.
If it does not
- You hear the voice twice. The avatar plays the sound itself. Mute or remove the element that played it before.
- No sound until a click. Browsers only start sound after a click or tap. Create the AudioContext in a click handler and set it as live.ctx before the first speak.
- A black box. The browser has no WebGL 2.
Next
Change the letter to change the face: 'a' to 'h' are free. To use a face of your own without the mark, see Your own avatar.
