Overview
SLNG is a third-party gateway that proxies STT requests to underlying providers (such as Deepgram and Sarvam) through a unified API. The plugin supports realtime streaming over WebSocket as well as HTTP batch recognition, and routes requests across regions using a single API key.
Installation
Install the plugin:
uv add "livekit-agents[slng]~=1.5"
Authentication
The SLNG plugin requires a SLNG API key. Sign up at slng.ai to get one.
Set SLNG_API_KEY in your .env file.
Usage
Use SLNG STT in an AgentSession or as a standalone transcription service. For example, you can use this STT in the Voice AI quickstart.
from livekit.plugins import slngsession = AgentSession(stt=slng.STT(model="deepgram/nova:3",),# ... llm, tts, etc.)
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
api_keystringEnv: SLNG_API_KEYSLNG API key. Required if the environment variable isn't set.
modelstringDefault: deepgram/nova:3The SLNG model identifier in <provider>/<model>[:variant] format. For a list of supported provider and model identifiers, see the SLNG documentation .
slng_base_urlstringDefault: api.slng.aiThe SLNG gateway host. Override this only if you need to use a custom deployment.
region_overridestring | list[str]Pin requests to one or more SLNG regions, as a single region code or a priority-ordered list. Sent to the gateway as the X-Region-Override header. For supported region codes, see the SLNG documentation .
languagestringDefault: enLanguage code for the input audio. Supported values depend on the selected model.
Additional resources
The following resources provide more information about using SLNG with LiveKit Agents.
Python package
The livekit-plugins-slng package on PyPI.
Plugin reference
Reference for the SLNG plugin.
GitHub repo
View the source or contribute to the LiveKit SLNG plugin.
SLNG docs
SLNG's full docs site.
Voice AI quickstart
Get started with LiveKit Agents and SLNG.
SLNG TTS
Guide to the SLNG TTS plugin with LiveKit Agents.