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
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.
/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’sbot.py has the complete file, with the imports, the OpenAI Realtime service and the runner.
bot.py
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:
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. WithSmallWebRTCTransport, 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:
4. Run it
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:7860in.env; the starter’s.env.exampledoes.-t webrtcturns on only the WebRTC transport. - Cap the whole conversation. Simli’s
max_session_lengthends 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/offerroute returns403in production until you add your own auth.
Learn more
- The starter’s README: changing the face, voice and prompt, and how it works
- Pipecat’s guide to Simli
- Pipecat docs: tools, other models and more