Create a new agent in your browser using this model
Overview
ElevenLabs speech-to-text is available in LiveKit Agents through LiveKit Inference and the ElevenLabs plugin. With LiveKit Inference, your agent runs on LiveKit's infrastructure to minimize latency. No separate provider API key is required, and usage and rate limits are managed through LiveKit Cloud. Use the plugin instead if you want to manage your own billing and rate limits. Pricing for LiveKit Inference is available on the pricing page.
LiveKit Inference
Use LiveKit Inference to access ElevenLabs STT without a separate ElevenLabs API key.
| Model name | Model ID | Languages |
|---|---|---|
Scribe v2 Realtime | elevenlabs/scribe_v2_realtime | afaframamhararaasasmazazjbebelbgbulbnbenbsbosmymyacacatcscesnynyacycymdadandedeuelellenengesspaetestfafasfffulfifinfrfragagleglglglglugkakatgugujhahauhehebhihinhrhrvhuhunhyhyeidindigiboisislititajajpnjvjavkkkazkmkhmknkankokorkukurkykirlbltzlnlinlolaoltlitlvlavmimrimkmkdmlmalmnmonmrmarmsmsamtmltnenepnlnldnonorocociororipapanplpolpspusptporroronrurussrsrpsdsndskslkslslvsnsnasosomsvsweswswatatamteteltgtgkththatrturukukrururduzuzbviviewowolxhxhozhzhozuzulastcebfilkealuonsoumbyue |
Usage
To use ElevenLabs, use the STT class from the inference module:
from livekit.agents import AgentSession, inferencesession = AgentSession(stt=inference.STT(model="elevenlabs/scribe_v2_realtime",language="en"),# ... tts, stt, vad, turn_handling, etc.)
import { AgentSession, inference } from '@livekit/agents';session = new AgentSession({stt: new inference.STT({model: "elevenlabs/scribe_v2_realtime",language: "en"}),// ... llm, tts, vad, turnHandling, etc.});
Parameters
modelstringThe model to use for the STT.
languageLanguageCodeLanguage code for the transcription.
extra_kwargsdictAdditional parameters to pass to the ElevenLabs STT API. See model parameters for supported fields.
In Node.js this parameter is called modelOptions.
Model parameters
Pass the following parameters inside extra_kwargs (Python) or modelOptions (Node.js):
| Parameter | Type | Notes |
|---|---|---|
commit_strategy | "manual" | "vad" | Controls when audio chunks are committed for transcription. |
include_timestamps | bool | Whether to include word-level timestamps in transcription results. |
vad_silence_threshold_secs | float | Duration of silence in seconds that triggers end-of-speech detection. |
vad_threshold | float | Sensitivity threshold for voice activity detection. |
min_speech_duration_ms | int | Minimum duration of speech in milliseconds required to start a transcription segment. |
min_silence_duration_ms | int | Minimum duration of silence in milliseconds required to end a transcription segment. |
language_code | str | BCP-47 language code for transcription. When set, disables automatic language detection. |
Multilingual transcription
ElevenLabs Scribe 2 Realtime supports multilingual transcription for over 90 languages with automatic language detection.
String descriptors
As a shortcut, you can also pass a model ID string directly to the stt argument in your AgentSession:
from livekit.agents import AgentSessionsession = AgentSession(stt="elevenlabs/scribe_v2_realtime:en",# ... tts, stt, vad, turn_handling, etc.)
import { AgentSession } from '@livekit/agents';session = new AgentSession({stt: "elevenlabs/scribe_v2_realtime:en",// ... tts, stt, vad, turnHandling, etc.});
Plugin
LiveKit's plugin support for ElevenLabs lets you connect directly to ElevenLabs' STT API with your own API key. For Node.js, use LiveKit Inference instead.
Installation
Install the plugin from PyPI:
uv add "livekit-agents[elevenlabs]~=1.4"
Authentication
The ElevenLabs plugin requires an ElevenLabs API key.
Set ELEVEN_API_KEY in your .env file.
Usage
Use ElevenLabs 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 elevenlabssession = AgentSession(stt=elevenlabs.STT(model_id="scribe_v2_realtime",),# ... llm, tts, etc.)
Parameters
This section describes some of the available parameters. See the plugin reference links in the Additional resources section for more details.
model_idstringDefault: scribe_v2_realtimeThe ElevenLabs model to use for speech recognition.
Additional resources
The following resources provide more information about using ElevenLabs with LiveKit Agents.