# Stork Live: Pipecat

Give a Pipecat bot a face from the page, or choose the face in the bot with pipecat-stork.

Tested 2026-12-02. HTML: https://www.stork.ai/live/docs/pipecat

## Before you start

A Pipecat bot that already speaks, and a page that uses the Pipecat client.

## Code

```js
// 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-stork
```

To choose the face in the bot's code:

```python
# pip install pipecat-stork
from pipecat_stork import StorkLiveAvatar

# in the pipeline, after text-to-speech
StorkLiveAvatar(avatar="a")
```

```js
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.
