Skip to main content

Synthesia plugin for LiveKit Agents

Attach a Synthesia interactive avatar to a LiveKit voice agent. The avatar joins the room and lip-syncs the agent's speech in real time.

See the Synthesia integration docs for more information.

Installation

pip install livekit-plugins-synthesia

Pre-requisites

You'll need an API key from Synthesia. It can be set as an environment variable: SYNTHESIA_API_KEY

Usage

from livekit.plugins import synthesia

avatar = synthesia.AvatarSession(
    synthesia.AvatarConfig(
        avatar_ids=["03cee7ec-ac90-45ec-8c20-74a399cf3dc4"]
    ),  # SYNTHESIA_API_KEY from env
)
await avatar.start(session, room=ctx.room)  # before session.start
await session.start(agent=Agent(...), room=ctx.room)

Set your Synthesia workspace API key in SYNTHESIA_API_KEY, or pass api_key=. avatar_ids takes one to five gallery ids of avatars available to your workspace. The first is the active avatar; the rest are precomputed by the worker so swap_avatar() can switch to them mid-session. An id your workspace cannot access raises synthesia.SynthesiaError with type=synthesia.ErrorType.UNKNOWN_AVATAR.

await avatar.swap_avatar("<another-id-from-avatar-ids>")  # switch mid-session
await avatar.swap_avatar("default")  # back to the first id

Faster first words

By default start() returns once the avatar has joined the room, so the agent's greeting is only generated after the session request completes. Pass wait_for_avatar=False to return straight away and launch the avatar in the background. The greeting is then generated while the avatar starts, held until the avatar's video is up, and spoken as soon as it is.

await avatar.start(session, room=ctx.room, wait_for_avatar=False)
await session.start(agent=Agent(...), room=ctx.room)
session.generate_reply(instructions="Greet the user.")

await avatar.wait_until_ready()  # optional: raises synthesia.SynthesiaError if the avatar failed to start

With wait_for_avatar=False, a failed launch no longer raises from start(). It closes the avatar session, is logged, and is raised by wait_until_ready(). The agent's audio stays routed to the avatar until the session ends, so its speech won't be heard: end or restart the session when wait_until_ready() raises.

Parameters

Parameter Default Description
avatar_participant_identity "synthesia-avatar-agent" The LiveKit identity the avatar joins under. Must be unique per concurrent avatar in a room: LiveKit evicts an existing participant when a second joins with the same identity, so give each avatar its own identity to run several in one room.
avatar_participant_name "Synthesia avatar" The LiveKit display name the avatar joins under.
avatar = synthesia.AvatarSession(
    synthesia.AvatarConfig(avatar_ids=["03cee7ec-ac90-45ec-8c20-74a399cf3dc4"]),
    avatar_participant_identity="avatar-host",
)

Metadata

Release files for livekit-plugins-synthesia 1.8.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livekit-plugins-synthesia 1.8.10
File Size Uploaded Provenance Actions
livekit_plugins_synthesia-1.8.10.tar.gz 14.7 kB With provenance Details for livekit_plugins_synthesia-1.8.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-synthesia 1.8.10
File Interpreter ABI Platform Actions
livekit_plugins_synthesia-1.8.10-py3-none-any.whl Python 3 none any Details for livekit_plugins_synthesia-1.8.10-py3-none-any.whl

Total release size: 32.9 kB

Release files / livekit_plugins_synthesia-1.8.10.tar.gz

Download URL livekit_plugins_synthesia-1.8.10.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cf6f8bdd5648da5a9d6164e71f9206a3e370ccd9375e1fac2b0fa4161ca56ea8
BLAKE2b-256 checksum
How to use checksums
e00cc5d3559ee1a400d64f5ee2fd937851d41b355b5d7b54de5a65bf1d6f1bc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Release files / livekit_plugins_synthesia-1.8.10-py3-none-any.whl

Download URL livekit_plugins_synthesia-1.8.10-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e037d02ea8cc6d283fbf0ef8465de8d226659824f669f9f33456339aece742c
BLAKE2b-256 checksum
How to use checksums
d59835b2b6a73b8fc42b1f92b0a342d7ae319f5fe565536cdb0ed4cb221ab348
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for livekit-plugins-synthesia 1.8.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for livekit_plugins_synthesia-1.8.10.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page