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
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",
)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livekit_plugins_synthesia-1.8.2.tar.gz.
File metadata
- Download URL: livekit_plugins_synthesia-1.8.2.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5daa930b7d6d17dfe68d8a4c13af6080357aee401abc040517161981e219b047
|
|
| MD5 |
e08748883d210282f414265258c7b56d
|
|
| BLAKE2b-256 |
a43f71a279c1aa620128f3e32869e388ee554789322023574dc31bb4fd2e8bf4
|
Provenance
The following attestation bundles were made for livekit_plugins_synthesia-1.8.2.tar.gz:
Publisher:
publish.yml on livekit/agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_synthesia-1.8.2.tar.gz -
Subject digest:
5daa930b7d6d17dfe68d8a4c13af6080357aee401abc040517161981e219b047 - Sigstore transparency entry: 2850014479
- Sigstore integration time:
-
Permalink:
livekit/agents@bb8c72255c40fdfd689248e0632825af7e2d7b32 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/livekit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bb8c72255c40fdfd689248e0632825af7e2d7b32 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file livekit_plugins_synthesia-1.8.2-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_synthesia-1.8.2-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e34c7ba00c5651bee9dfe3e8762c3e5f9074409846e8086a5e4420ca34f82e7e
|
|
| MD5 |
6971f80a72e9d2a4c81376a8bca40395
|
|
| BLAKE2b-256 |
22662e60a4596f4f9c8fb6e750561d9f4c4780ac73a89107696dd8b2e6f45200
|
Provenance
The following attestation bundles were made for livekit_plugins_synthesia-1.8.2-py3-none-any.whl:
Publisher:
publish.yml on livekit/agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_synthesia-1.8.2-py3-none-any.whl -
Subject digest:
e34c7ba00c5651bee9dfe3e8762c3e5f9074409846e8086a5e4420ca34f82e7e - Sigstore transparency entry: 2850014603
- Sigstore integration time:
-
Permalink:
livekit/agents@bb8c72255c40fdfd689248e0632825af7e2d7b32 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/livekit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bb8c72255c40fdfd689248e0632825af7e2d7b32 -
Trigger Event:
pull_request
-
Statement type: