Pipecat
Stork Live · tested 2026-12-02
Give a Pipecat bot a face from the page, or choose the face in the bot with pipecat-stork.
Before you start
A Pipecat bot that already speaks, and a page that uses the Pipecat client.
Code
// in the page
const live = await StorkLive.mount(canvas, { avatar: 'a', siteKey: 'YOUR_SITE_KEY' })
const pcClient = new PipecatClient({
transport: new SmallWebRTCTransport(), // or DailyTransport
callbacks: {
onTrackStarted: (track, participant) => {
if (track.kind === 'audio' && !participant?.local) live.speak(track)
},
},
})
// to choose the face in the bot's code instead: pip install pipecat-storkTo choose the face in the bot's code:
# pip install pipecat-stork
from pipecat_stork import StorkLiveAvatar
# in the pipeline, after text-to-speech
StorkLiveAvatar(avatar="a")import { attachToPipecat } from 'stork-live/pipecat'
const face = await attachToPipecat(client, canvas, { audioContext })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
- The lips never move. With the WebRTC transport the bot's track arrives with no participant, so test for "not local" as in the code above.
- 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.
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.
