Skip to main content

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

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.5.tar.gz (10.7 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.5-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_spatius-1.6.5.tar.gz.

File metadata

  • Download URL: livekit_plugins_spatius-1.6.5.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for livekit_plugins_spatius-1.6.5.tar.gz
Algorithm Hash digest
SHA256 63eee57e596e0980724b5356770c75410eb90949626b2a860edcdb0d0ede1cbe
MD5 17da1822c9022ab51469554cb609eacb
BLAKE2b-256 514af0cd79b4f2b185b78f186a230aa70d77763f90d94b145376b43bdf623ab5

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_spatius-1.6.5.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.5-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_spatius-1.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 099c2959f34b4c91482b37a21d98cad38d25e814c31510cb02e5d3b595195218
MD5 06ecb98ed186ab04b84f4f72d4545a9e
BLAKE2b-256 a8e398db09b40a2434956e6f31571665c3eba10ad3490631d11cf3d6ab626d6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_spatius-1.6.5-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.5 This release

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