video
Simli video service for real-time avatar generation.
- class pipecat.services.simli.video.SimliVideoSettings(model: str | None | _NotGiven = <factory>, extra: dict[str, Any]=<factory>)[source]
Bases:
ServiceSettingsSettings for the Simli video service.
- class pipecat.services.simli.video.SimliVideoService(*, api_key: str, face_id: str, simli_url: str = 'https://api.simli.ai', is_trinity_avatar: bool = False, params: InputParams | None = None, max_session_length: int | None = None, max_idle_time: int | None = None, enable_logging: bool | None = None, settings: SimliVideoSettings | None = None, **kwargs)[source]
Bases:
AIServiceSimli video service for real-time avatar generation.
Provides real-time avatar video generation by processing audio frames and producing synchronized video output using the Simli API. Handles audio resampling, video frame processing, and connection management.
- Settings
alias of
SimliVideoSettings
- class InputParams(*, enable_logging: bool | None = None, max_session_length: int | None = None, max_idle_time: int | None = None)[source]
Bases:
BaseModelInput parameters for Simli video configuration.
Deprecated since version 0.0.106: Use
SimliVideoService.Settings(...)instead.- Parameters:
enable_logging – Whether to enable Simli logging.
max_session_length – Absolute maximum session duration in seconds. Avatar will disconnect after this time even if it’s speaking.
max_idle_time – Maximum duration in seconds the avatar is not speaking before the avatar disconnects.
- enable_logging: bool | None
- max_session_length: int | None
- max_idle_time: int | None
- __init__(*, api_key: str, face_id: str, simli_url: str = 'https://api.simli.ai', is_trinity_avatar: bool = False, params: InputParams | None = None, max_session_length: int | None = None, max_idle_time: int | None = None, enable_logging: bool | None = None, settings: SimliVideoSettings | None = None, **kwargs)[source]
Initialize the Simli video service.
- Parameters:
api_key – Simli API key for authentication.
face_id – Simli Face ID. For Trinity avatars, specify “faceId/emotionId” to use a different emotion than the default.
simli_url – URL of the simli servers. Can be changed for custom deployments of enterprise users.
is_trinity_avatar – Boolean to tell simli client that this is a Trinity avatar which reduces latency when using Trinity.
params –
Additional input parameters for session configuration.
Deprecated since version 0.0.106: Use
settings=SimliVideoService.Settings(...)instead.max_session_length – Absolute maximum session duration in seconds. Avatar will disconnect after this time even if it’s speaking.
max_idle_time – Maximum duration in seconds the avatar is not speaking before the avatar disconnects.
enable_logging – Whether to enable Simli logging.
settings – Service settings.
**kwargs – Additional arguments passed to the parent AIService.
- async start(frame: StartFrame)[source]
Start the Simli video service.
- Parameters:
frame – The start frame containing initialization parameters.
- async stop(frame: EndFrame)[source]
Stop the Simli video service.
- Parameters:
frame – The end frame.
- async cancel(frame: CancelFrame)[source]
Cancel the Simli video service.
- Parameters:
frame – The cancel frame.
- async process_frame(frame: Frame, direction: FrameDirection)[source]
Process incoming frames and handle Simli video generation.
- Parameters:
frame – The frame to process.
direction – The direction of frame processing.