Skip to main content

Overview

LemonSlice integrates with Pipecat, an open-source framework for building multimodal conversational agents by Daily. The LemonSliceTransport object connects your Pipecat app to a LemonSlice avatar for real-time voice conversations with synchronized video.
Jump to the starter projects section for ready-to-use repos. For production UI patterns (avatar readiness, error handling, timeouts), see Production checklist.

Prerequisites

Before integrating LemonSlice with Pipecat, ensure you have the following:
  1. LemonSlice avatar configuration Either a base image URL or a LemonSlice avatar ID.
    • Agent base image — a publicly accessible image URL of your avatar, focused on the face. The image should be 368 × 560 pixels. LemonSlice will automatically center-crop your image to the target aspect ratio if the dimensions do not match the expected values. Best results are achieved with anthropomorphic images where the face and mouth are clearly identifiable.
    • LemonSlice Agent ID
      Selected voices and personalities for a LemonSlice avatar preset are ignored when using the Pipecat plugin.
  2. Pipecat Python Application

How to use

1

Install the plugin

Within your Pipecat app, install the LemonSlice transport:
SHELL
2

Authenticate

  1. Create a LemonSlice API key
  2. In your Pipecat app, set LEMONSLICE_API_KEY in your .env file
3

Create the LemonSlice transport layer

Create an instance of LemonSliceTransport by providing your bot name, LemonSlice API key, session request, and additional parameters.
PYTHON
Parameters for LemonSliceTransport:Parameters for LemonSliceNewSessionRequest.Parameters for lemonslice_properties.
4

Insert the LemonSlice transport layer into the pipeline

Add the LemonSlice transport layer to your processing pipeline.
PYTHON
The LemonSlice avatar participant is automatically filtered out from transport.on_client_connected and transport.on_client_disconnected events. Only human participant connections trigger these event handlers.

Implementation Details

  • LemonSlice uses Daily as the underlying transport layer, so all Daily features and configuration options are available through the inherited DailyParams.
  • The transport automatically manages interruptions and sends appropriate control messages (interrupt, response_started, response_finished) to the LemonSlice session.
  • The LemonSlice avatar’s microphone is automatically muted to prevent audio feedback loops.
  • The Daily video UI should filter out the Pipecat bot participant from being displayed. This participant only exists to facilitate passing audio between the user, Pipecat, and LemonSlice.

Starter projects

Additional resources

LemonSliceTransport documentation