Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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 and motion data back into the same room.

Client-side rendering

Spatius avatars are rendered on the client instead of being sent as conventional server-rendered video. The avatar's LiveKit video track carries motion data in otherwise black frames, so a standard LiveKit video renderer will display a black screen. Your frontend must use the Spatius client SDK and LiveKit adapter to decode the track and render the avatar.

See the client integration guide and the reference frontend for a working implementation.

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 the Spatius LiveKit Agents documentation.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_plugins_spatius-1.6.6rc1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_plugins_spatius-1.6.6rc1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_spatius-1.6.6rc1.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_spatius-1.6.6rc1.tar.gz
Algorithm Hash digest
SHA256 15daec0af102d72ccdb9902ba8cf6242a6c64e8485d7df4253c60e56cbc8db31
MD5 ff993819f8e750c0bd8747724e6ed354
BLAKE2b-256 549e3f3f58a2f5e49e88ef12bcabfe0d0879094f859b10eeae6e5d0fda92234a

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_spatius-1.6.6rc1.tar.gz:

Publisher: publish.yml on spatius-ai/livekit-plugins-spatius

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file livekit_plugins_spatius-1.6.6rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_spatius-1.6.6rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6a433463bfe563c310e173ed94f2aaac92e2cc4ed9639bd33ba5f2a1f506b3e
MD5 af842b638234f4bd6c2768eb14cd1425
BLAKE2b-256 a773ad3e130bdee68cfe9f0e16e43b930cee4c2214c1da40d8b51463aa52cba6

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_spatius-1.6.6rc1-py3-none-any.whl:

Publisher: publish.yml on spatius-ai/livekit-plugins-spatius

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.7.0

2 files

1.6.10

2 files

1.6.9

2 files

1.6.8

2 files

1.6.7

2 files

This release

1.6.6rc1 This release

2 files

1.6.5

2 files

1.6.4

2 files

1.6.0

2 files

1.5.17

2 files

1.5.15

2 files

1.5.8

2 files

1.4.5

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page