Skip to main content

Overview

SimliVideoService integrates with Simli to create real-time AI avatar video experiences using WebRTC streaming. The service processes audio input to generate synchronized avatar video and audio output, handling real-time streaming, audio resampling, and conversation interruptions for engaging conversational AI applications.

Simli Video API Reference

Pipecat’s API methods for Simli video integration

Example Implementation

Complete example with avatar streaming

Simli Documentation

Official Simli API documentation and guides

Simli Platform

Access avatar faces and manage API keys

Installation

To use Simli services, install the required dependency:

Prerequisites

Simli Account Setup

Before using Simli video services, you need:
  1. Simli Account: Sign up at Simli Platform
  2. API Key: Generate an API key from your account dashboard
  3. Face Selection: Choose or create avatar faces for video generation
  4. WebRTC Setup: Configure real-time streaming capabilities

Required Environment Variables

  • SIMLI_API_KEY: Your Simli API key for authentication
  • SIMLI_FACE_ID: ID of your avatar face

Configuration

str
required
Simli API key for authentication.
str
required
Simli Face ID. For Trinity avatars, specify "faceId/emotionId" to use a different emotion than the default.
str
default:"https://api.simli.ai"
URL of the Simli servers. Can be changed for custom deployments by enterprise users.
bool
default:"None"
deprecated
Deprecated since 1.16.0, removed in 2.0.0. No replacement; it has no effect.
int
default:"None"
Absolute maximum session duration in seconds. Avatar disconnects after this time even if speaking.
int
default:"None"
Maximum duration in seconds the avatar can be idle (not speaking) before disconnecting.
bool
default:"None"
Accepted but has no effect: the value is not passed to Simli.
SimliFraming
default:"None"
Framing for Trinity-2 faces; other faces keep their own frame size. None keeps Simli’s defaults (768x768, avatar at the bottom center). Set the output transport’s video_out_width and video_out_height to match streaming_width and streaming_height. See Framing below.
SimliVideoSettings
default:"None"
Service settings. Use SimliVideoService.Settings(...) for configuration.
InputParams
default:"None"
Deprecated since 0.0.106: Use the direct constructor parameters (max_session_length, max_idle_time, enable_logging) or settings=SimliVideoService.Settings(...) instead.
Additional input parameters for session configuration. See InputParams below.

Framing

SimliVideoService.Framing(...) fields. A field left as None keeps Simli’s default.

InputParams

Deprecated since 0.0.106: Use the direct constructor parameters (max_session_length, max_idle_time, enable_logging) instead of SimliVideoService.InputParams.

Usage

Basic Setup

With Session Configuration

Using Settings (Alternative)

Notes

  • Service architecture: As of version 0.0.106, SimliVideoService extends AIService and supports SimliVideoService.Settings(...) for configuration, aligning it with other video services like HeyGen and Tavus.
  • Audio resampling: The service resamples audio to 16kHz internally for the Simli API and resamples received audio back to the pipeline’s sample rate.
  • Audio sources: The avatar speaks TTSAudioRawFrame from a TTS service or SpeechOutputAudioRawFrame from speech-to-speech services that stream their voice, such as OpenAILiveLLMService. Audio goes to Simli as it arrives, and the avatar’s voice is pushed as the same frame type.
  • Interruptions: An InterruptionFrame clears Simli’s buffer. A user speaking without interrupting the bot does not.
  • Deprecated parameters:
    • SimliVideoService.InputParams is deprecated since 0.0.106. Use direct constructor parameters (max_session_length, max_idle_time, enable_logging) instead.
    • The simli_config and use_turn_server parameters have been removed. Use api_key and face_id directly as constructor parameters.