Skip to main content

Sophon-Realtime plugin for LiveKit Agents

Sophon-Realtime is an open-weights, self-hosted, full-duplex speech-to-speech model family (Apache-2.0): it listens while it talks, decides on its own when you have finished, and answers in an expressive voice. This plugin makes it the realtime model of a LiveKit agent.

You run the model on your own GPU; nothing is sent to a third-party API.

Install

pip install livekit-plugins-sophon

Run the model (your server)

pip install "sophon-realtime[trt]" && sophon-realtime serve --port 8000      # one 80 GB GPU
git clone https://github.com/adventists-ai/sophon-realtime && cd sophon-realtime/live
BUILD=tag PORT=8000 LIVE_PORT=8780 bash start_live.sh                         # the gateway LiveKit talks to

Smaller GPUs: see the 4B builds in the model list.

Use it

from livekit import agents
from livekit.agents import Agent, AgentSession
from livekit.plugins import sophon


async def entrypoint(ctx: agents.JobContext):
    await ctx.connect()
    session = AgentSession(llm=sophon.RealtimeModel(base_url="http://YOUR_SERVER:8780/v1"))
    await session.start(room=ctx.room, agent=Agent(instructions="You are Nova, a friendly voice assistant. Keep replies short."))


if __name__ == "__main__":
    agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint))

base_url can also come from SOPHON_BASE_URL, and the key from SOPHON_API_KEY (only needed if you set SOPHON_LIVE_REALTIME_KEYS_FILE on the gateway).

Parameter Default Notes
base_url SOPHON_BASE_URL The Live gateway (http://HOST:LIVE_PORT/v1), not the engine port
api_key SOPHON_API_KEY or any value
model sophon-realtime
voice chelsie Or a voice you cloned on the server

Everything else (http_session, conn_options, max_session_duration, tools via @function_tool) works as with LiveKit's OpenAI realtime plugin.

Notes

  • Turn-taking is server-side. Do not add a VAD or turn detector; the model hears you while it speaks, so you can interrupt it.
  • Function calling works with the 32B builds. The 4B builds do not call tools.
  • Give the agent a name and persona in instructions; without one the model may invent a name.
  • Replies can contain sound tags such as [laughter] in the transcript; they are performed, not read out.

Metadata

Release files for livekit-plugins-sophon 0.1.0

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-sophon 0.1.0
File Size Uploaded Provenance Actions
livekit_plugins_sophon-0.1.0.tar.gz 3.7 kB Without provenance Details for livekit_plugins_sophon-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.9 kB

Release files / livekit_plugins_sophon-0.1.0.tar.gz

Download URL livekit_plugins_sophon-0.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
86f11edd88516eaae8130044e2996a89f35a5d421ba3e2c20e02ec69630da48f
BLAKE2b-256 checksum
How to use checksums
ea2406304df72a634c10112d56c75180b6eafa5ab8d347fa454a4e5081480c44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / livekit_plugins_sophon-0.1.0-py3-none-any.whl

Download URL livekit_plugins_sophon-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c1947ff05f78aaf7fcb0e7803678a76dbb5a57f737d6f8b512e2cb539450308
BLAKE2b-256 checksum
How to use checksums
e115d20562808293f59309c7013b0228d31b9c211fc59692858fb892968b5061
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for livekit-plugins-sophon 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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