> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Stork Live Avatar

> StorkLiveAvatar gives a Pipecat voice bot a lip-synced face that the visitor's browser draws itself, free for unlimited sessions with no per-minute charge.

> [!NOTE]
>
> **Community-maintained integration.** This service is built and
> maintained by
> [jupiterspins](https://github.com/jupiterspins)
> . Pipecat does not test or officially support it. Please report issues and
> request changes on the
> [source repository](https://github.com/jupiterspins/stork-live/tree/main/integrations/pipecat)
> . Learn more about
> [community integrations](https://docs.pipecat.ai/api-reference/server/services/community-integrations.md)
> .

## Overview

[Stork Live](https://www.stork.ai/live) is a talking avatar that the visitor's browser
draws itself. The avatar is a file of about 8 MB. A small model in the page moves the
lips from the audio track the page already receives from your bot. The bot keeps its
own STT, LLM, TTS and transport: the pipeline carries no video frames, and the bot's
audio is not changed.

`StorkLiveAvatar` is a pass-through processor. It tells the page which face to draw,
with a `stork-avatar` RTVI server message, sent when a client connects and each time
the bot starts to speak. The bot calls no external service and needs no API key,
and nothing is billed per minute. In the page, the `stork-live` client reports each
session to Stork with a free site key (see Prerequisites). The library faces are
free and carry a "Powered by stork.ai" mark.

In the page, `attachToPipecat(client, canvas)` from the open source `stork-live` npm
package draws the named face and follows the bot's audio track. The lips follow
whatever audio the bot sends, so an interruption needs nothing special: when the bot
stops, the lips stop.

> [!WARNING]
>
> The face is drawn by the `stork-live` web client in your page. A client
> without it, such as Pipecat's prebuilt UI, plays the bot's voice but shows no
> face. See [Browser](#browser).

> [card] [Source Repository](https://github.com/jupiterspins/stork-live/tree/main/integrations/pipecat)
>
> Source code, the example bot and page, tests and issues

> [card] [PyPI Package](https://pypi.org/project/pipecat-stork/)
>
> The `pipecat-stork` package on PyPI

> [card] [Web Client](https://github.com/jupiterspins/stork-live)
>
> The Apache-2.0 client that draws the avatar, with TypeScript types

> [card] [Try It](https://www.stork.ai/live)
>
> Talk to the avatar in your browser, no sign-up

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

```bash theme={null}
uv add pipecat-stork
```

The page loads the web client from npm (`npm install stork-live`) or from a CDN at
`https://cdn.jsdelivr.net/npm/stork-live@0.2/src/pipecat.js`.

## Prerequisites

Nothing for the bot. For the page on a real site, a free site key from
[stork.ai/dashboard/live](https://www.stork.ai/dashboard/live), passed as `siteKey`;
on localhost none is needed. The client reports the key, the face and its version
when an avatar is mounted, and how long it speaks; nothing about the visitor. RTVI
must be enabled on the task, which is Pipecat's default.

### Environment Variables

* `STORK_AVATAR` (optional): the avatar to draw when the constructor is given none

## Configuration

**avatar** `str` (default: "a")

A face from the free library (`"a"` to `"d"`), or the https address of an
avatar file of your own, without its extension. Falls back to `STORK_AVATAR`,
then `"a"`.

`await avatar.set_avatar("c")` switches the face during a call.

## Usage

```python theme={null}
from pipecat.pipeline.pipeline import Pipeline
from pipecat_stork import StorkLiveAvatar

avatar = StorkLiveAvatar(avatar="a")

pipeline = Pipeline(
    [
        transport.input(),
        stt,
        user_aggregator,
        llm,
        tts,
        avatar,  # names the face; passes every frame through
        transport.output(),
        assistant_aggregator,
    ]
)
```

## Browser

```javascript theme={null}
import { attachToPipecat } from "stork-live/pipecat";

// in a click handler, so the browser allows sound
const audioContext = new AudioContext({ sampleRate: 16000 });

const client = new PipecatClient({
  transport: new SmallWebRTCTransport(),
  enableMic: true,
});
const face = attachToPipecat(client, document.querySelector("canvas"), {
  audioContext,
  siteKey: "pk_stork_…", // free; not needed on localhost
});
await client.connect({ webrtcUrl: "/api/offer" });
```

The avatar plays the bot's voice itself, about a third of a second late, so lips and
sound line up. Do not also attach the bot's audio track to an `<audio>` element, or
the voice is heard twice.

## Notes

* The avatar shows head and shoulders at 512 pixels. The lip model was trained on English.
* If the named face cannot be loaded, the page reports the error and draws the default face.
* An avatar of your own, made from one photo and without the mark, is a paid option; see [stork.ai/live](https://www.stork.ai/live).

## Compatibility

Tested with Pipecat v1.17.0, `@pipecat-ai/client-js` 1.18 and
`@pipecat-ai/small-webrtc-transport` 1.11 in Chrome.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.