Skip to main content
Pre-release

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

SLNG plugin for LiveKit Agents

Support for SLNG's voice AI gateway in LiveKit Agents, providing access to multiple STT and TTS providers through a unified API.

See https://docs.slng.ai/ for more information.

Installation

pip install livekit-plugins-slng

Pre-requisites

You'll need an API key from SLNG. It can be set as an environment variable: SLNG_API_KEY

Usage

Pass an SLNG model identifier; the plugin connects through SLNG's Unmute Bridge and builds the endpoint itself.

from livekit.plugins import slng

stt = slng.STT(
    model="deepgram/nova:3",
    language="en",
)

tts = slng.TTS(
    model="deepgram/aura:2",
    voice="aura-2-thalia-en",  # provider voice ID, required
    language="en",
)

Additional keyword arguments are forwarded to the gateway and applied according to the selected model's contract. Failover across multiple models or endpoints is available via connections=[...]; see docs.slng.ai for details.

End of turn finalization

For the lowest STT turn latency, let the plugin know when the user stops speaking. The plugin then sends a finalize signal so the provider returns the final transcript immediately instead of waiting for its own endpointing:

session = AgentSession(stt=stt, ...)
stt.attach_to_session(session)

Or wire it manually:

@session.on("user_state_changed")
def _on_user_state_changed(ev):
    stt.notify_user_state(ev.new_state)

Without this hook the plugin still works, but end of turn detection relies entirely on the provider's endpointing, which typically adds a few hundred milliseconds per turn.

Region override

The plugin supports gateway region routing via the region_override option on both STT and TTS. This maps directly to the gateway's X-Region-Override header. See the available regions at docs.slng.ai/region-override.

You can pass either a single region:

stt = slng.STT(
    api_key="your-slng-api-key",
    model="deepgram/nova:3",
    region_override="eu-west-1",
)

Or multiple preferred regions in priority order:

tts = slng.TTS(
    api_key="your-slng-api-key",
    model="deepgram/aura:2",
    voice="aura-2-thalia-en",
    region_override=["eu-west-1", "us-east-1"],
)

To constrain routing to a broad geographic zone instead of a specific region, use world_part_override (for example "eu"), which maps to the gateway's X-World-Part-Override header. region_override takes precedence when both are set.

Migrating from 1.x

Version 2.0 is a breaking change:

  • All traffic goes through the Unmute Bridge. model_endpoint and model_endpoints were removed; pass a model identifier or connections=[...] instead.
  • STT no longer defaults to model="deepgram/nova:3"; pass a model (or connections) explicitly.
  • TTS voice is required and passed verbatim as the provider's voice identifier.
  • Language codes are no longer normalized client-side; send the value the model expects (for example BCP-47 hi-IN for Sarvam, not hi).
  • STT recognize() (HTTP batch) is no longer supported; use stream(). Only pcm_s16le input audio is supported.
  • api_token still works on STT but is deprecated; use api_key.

Release files for livekit-plugins-slng 1.6.11rc1

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-slng 1.6.11rc1
File Size Uploaded
livekit_plugins_slng-1.6.11rc1.tar.gz 32.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-slng 1.6.11rc1
File Interpreter ABI Platform
livekit_plugins_slng-1.6.11rc1-py3-none-any.whl Python 3 none any Details

Total release size: 67.6 kB

Release files / livekit_plugins_slng-1.6.11rc1.tar.gz

Download URL livekit_plugins_slng-1.6.11rc1.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
66b247859b0e671bd5380c9e73f3d06a50816793f6c7cb8be32b8fe51de7e71e
BLAKE2b-256 checksum
How to use checksums
4f78999330a946e50fd22bf747310b4ed208aa895df94b296b09e0d142d66968
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / livekit_plugins_slng-1.6.11rc1-py3-none-any.whl

Download URL livekit_plugins_slng-1.6.11rc1-py3-none-any.whl
Size 35.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8ded3c719ebf83ed5e83be689383fdb1a79a685c168a289a904f867df377380
BLAKE2b-256 checksum
How to use checksums
a67691ced0a58317138721168abd852fa970707da20c6ffc842691dd4ec0a403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log
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