Agent Framework plugin for Spatius avatars
Project description
LiveKit Agents Plugin for Spatius Avatar
LiveKit Agents plugin for Spatius avatar sessions. It forwards TTS audio from a LiveKit agent session to Spatius and lets the avatar publish synchronized audio/video back into the same room.
Installation
pip install livekit-plugins-spatius
Quick Start
Set credentials:
export SPATIUS_API_KEY=your-api-key
export SPATIUS_APP_ID=your-app-id
export SPATIUS_AVATAR_ID=your-avatar-id
export LIVEKIT_URL=wss://your-livekit-host
export LIVEKIT_API_KEY=your-livekit-api-key
export LIVEKIT_API_SECRET=your-livekit-api-secret
Use plugin in your LiveKit agent:
from livekit.agents import Agent, AgentSession, JobContext, WorkerOptions, cli
from livekit.plugins import spatius
class VoiceAssistant(Agent):
def __init__(self) -> None:
super().__init__(instructions="You are a helpful voice assistant.")
async def entrypoint(ctx: JobContext) -> None:
await ctx.connect()
session = AgentSession(
vad=vad,
stt=stt,
llm=llm,
tts=tts,
)
avatar = spatius.AvatarSession()
await avatar.start(session, room=ctx.room)
await session.start(agent=VoiceAssistant(), room=ctx.room)
if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
For detailed usage, see Spatius docs.
License
MIT
Project details
Release history Release notifications | RSS feed
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_spatius-1.5.8.tar.gz.
File metadata
- Download URL: livekit_plugins_spatius-1.5.8.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9457bc7726c6b0aefd42f350af24dbfa93cfbdf860fa0d3f0cee723a7db3bb08
|
|
| MD5 |
e9be38f89e1dba464a1fbe722760e4a5
|
|
| BLAKE2b-256 |
dad790ad7bc2f544702309636ee4b8a50b8adee2aca8ae5930593e1d210d76b7
|
Provenance
The following attestation bundles were made for livekit_plugins_spatius-1.5.8.tar.gz:
Publisher:
publish.yml on spatius-ai/livekit-plugins-spatius
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_spatius-1.5.8.tar.gz -
Subject digest:
9457bc7726c6b0aefd42f350af24dbfa93cfbdf860fa0d3f0cee723a7db3bb08 - Sigstore transparency entry: 1531425598
- Sigstore integration time:
-
Permalink:
spatius-ai/livekit-plugins-spatius@a6569b45a26368ec188de8d8f74d51b9c970a556 -
Branch / Tag:
refs/tags/v1.5.8 - Owner: https://github.com/spatius-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6569b45a26368ec188de8d8f74d51b9c970a556 -
Trigger Event:
release
-
Statement type:
File details
Details for the file livekit_plugins_spatius-1.5.8-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_spatius-1.5.8-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb0b888b8564857c78b2a7d5b26e9a05e7c85dcd16d2c4db021acdb9e9d9b15e
|
|
| MD5 |
7eaed5cca782afa75e5b40acd5c3709a
|
|
| BLAKE2b-256 |
fd62215f3d93a5990a5df6160e26592c69e783f0a1678828709c670001be33db
|
Provenance
The following attestation bundles were made for livekit_plugins_spatius-1.5.8-py3-none-any.whl:
Publisher:
publish.yml on spatius-ai/livekit-plugins-spatius
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
livekit_plugins_spatius-1.5.8-py3-none-any.whl -
Subject digest:
fb0b888b8564857c78b2a7d5b26e9a05e7c85dcd16d2c4db021acdb9e9d9b15e - Sigstore transparency entry: 1531425699
- Sigstore integration time:
-
Permalink:
spatius-ai/livekit-plugins-spatius@a6569b45a26368ec188de8d8f74d51b9c970a556 -
Branch / Tag:
refs/tags/v1.5.8 - Owner: https://github.com/spatius-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a6569b45a26368ec188de8d8f74d51b9c970a556 -
Trigger Event:
release
-
Statement type: