Skip to main content
Pipecat is an open-source Python framework for voice and multimodal agents. Simli’s video service drops into a Pipecat pipeline: it takes the bot’s voice and returns the avatar’s lip-synced video and voice, in sync.

What you need

  • A Simli API key, from your Simli dashboard
  • An OpenAI API key. The starter uses OpenAI’s Realtime API, speech to speech, so there’s no separate speech-to-text or text-to-speech provider.
  • Python 3.11 or later (the starter uses uv), and Node.js 20.9 or later for the starter’s web page
Everything runs on your machine: Pipecat connects the browser to the bot over peer-to-peer WebRTC, so there are no other accounts or media servers to set up.

Run the starter

create-simli-app-pipecat

A Pipecat voice agent on OpenAI’s Realtime API, with a Simli Trinity-2 avatar and a small web page to talk to it. Its lockfile pins the versions it was tested with.
In a second terminal, start the web page:
Open http://localhost:3000, press Start and allow the microphone. The page holds no keys: it posts its WebRTC offer to its own /api/offer route, which forwards it to the bot. If the bot isn’t on http://localhost:7860, set BOT_URL in frontend/.env.local. Pipecat’s prebuilt client at http://localhost:7860 works too.

Build it yourself

1. Install the packages

2. Set your keys

Put them in a .env file next to your bot:
.env

3. Add the avatar to your pipeline

This is the core of the starter’s bot: the transport, the Simli service and the pipeline. The starter’s bot.py has the complete file, with the imports, the OpenAI Realtime service and the runner.
bot.py
Simli goes right after the service that produces the bot’s voice, and before the transport’s output.

Trinity-2 options

This gives a Trinity-2 face Simli’s default 768x768 video. From Pipecat 1.16, SimliVideoService takes Trinity-2’s framing itself. Set the transport’s video to the same size:
Pipecat 1.16 also sends the avatar’s video from the start of the session, not only once the bot first speaks, and passes GPT-Live’s voice (OpenAILiveLLMService) to Simli. On older Pipecat releases, see Trinity-2 in LiveKit Agents and Pipecat.

Video quality with SmallWebRTCTransport

The bot re-encodes the avatar’s video before sending it to the browser. With SmallWebRTCTransport, that’s done by aiortc, which starts at 0.5–1 Mbit/s: too little for a large Trinity-2 video, so the mouth looks smeared and the lip sync looks off. Pipecat has no setting for it, so raise aiortc’s limits near the top of bot.py:
Lower it for a smaller video or slow networks. Daily and other hosted transports encode the video themselves and don’t need this.

4. Run it

Then open http://localhost:7860, where Pipecat’s runner serves a ready-made browser client, press Connect and allow the microphone.

Before you go to production

The runner is for development.
  • Limit which sites can reach it. By default Pipecat’s runner accepts requests from any website, so a page open in your browser could start a conversation on your accounts. Set PIPECAT_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:7860 in .env; the starter’s .env.example does. -t webrtc turns on only the WebRTC transport.
  • Cap the whole conversation. Simli’s max_session_length ends the avatar, but not the pipeline, so the LLM keeps running. The starter cancels the pipeline after the same session length; do the same in your bot.
  • Put sign-in in front of anything that starts a bot. Anyone who can reach port 7860, or a page that forwards offers to it, can start a conversation that uses your Simli minutes and OpenAI credit. The starter’s /api/offer route returns 403 in production until you add your own auth.
To deploy, see Pipecat’s deployment guide.

Learn more