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. TTS failover across multiple models or endpoints is available via connections=[...]; see docs.slng.ai for details.

STT failover

One slng.STT speaks to one model. To fail over across models or regions, wrap several in stt.FallbackAdapter: a failed one is skipped until it recovers.

from livekit.agents import stt
from livekit.plugins import slng

speech_to_text = stt.FallbackAdapter(
    [
        slng.STT(model="deepgram/nova:3", region_override="eu-west-1"),
        slng.STT(model="deepgram/nova:3", region_override="us-east-1"),
    ]
)

End of turn finalization

The session flushes the STT at each end of turn, which sends the bridge a finalize: the provider returns the final transcript at once instead of waiting for its own endpointing. No wiring is needed.

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.
  • STT api_token was removed; use api_key.
  • STT takes one model: connections, final_timeout_s, fallback_recovery_cooldown_s, http_session, notify_user_state(), attach_to_session() and set_final_timeout_allowed() were removed. Wrap several slng.STT in stt.FallbackAdapter to fail over; the session's end of turn sends the finalize.

Metadata

Release files for livekit-plugins-slng 2.0.0b2

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 2.0.0b2
File Size Uploaded Provenance Actions
livekit_plugins_slng-2.0.0b2.tar.gz 16.4 kB With provenance Details for livekit_plugins_slng-2.0.0b2.tar.gz

Built distribution (wheel)

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

Total release size: 37.0 kB

Release files / livekit_plugins_slng-2.0.0b2.tar.gz

Download URL livekit_plugins_slng-2.0.0b2.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
13072c843ee0935a206f617f45beec48b0ef7aa45840b2f92162f8f3dd4ec1ec
BLAKE2b-256 checksum
How to use checksums
cb9836e6f74c8c151859737c73a2b48bde79c9127a0ff5fac9e80088bb69c95e
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 Nov 18, 2026.

Transparency log

Release files / livekit_plugins_slng-2.0.0b2-py3-none-any.whl

Download URL livekit_plugins_slng-2.0.0b2-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff840238d8591ebb74d2a143f95b921b87fab85f882f99fd6845f77033d0b27e
BLAKE2b-256 checksum
How to use checksums
8669a70ff80a7fa99060cbe11dd46f0aa8fc45a6dc21ca7d035bc5bda8eb8fda
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 Nov 18, 2026.

Transparency log

Security for livekit-plugins-slng 2.0.0b2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for livekit_plugins_slng-2.0.0b2.tar.gz

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 Nov 18, 2026.

Transparency log

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