Skip to main content

ElevenLabs plugin for LiveKit Agents

Support for voice synthesis with ElevenLabs.

See https://docs.livekit.io/agents/integrations/tts/elevenlabs/ for more information.

Installation

pip install livekit-plugins-elevenlabs

Pre-requisites

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

Realtime speech-to-text audio chunks

Configure the outgoing audio chunk duration when creating the STT instance:

from livekit.plugins import elevenlabs

stt = elevenlabs.STT(
    model="scribe_v2_realtime",
    audio_chunk_duration_ms=100,
)

audio_chunk_duration_ms accepts a positive integer in milliseconds and defaults to 50. At 100 ms, continuous audio produces approximately 10 audio messages per second instead of 20, at the cost of up to 50 ms additional buffering. Larger chunks do not pace reconnect backlogs or guarantee that provider queue errors are avoided. Flushes send any remaining partial chunk before the commit.

This option applies only to realtime STT and is set at construction time.

Scribe v3 Live turn prediction

Enable server-side turn prediction with scribe_v3_live:

from livekit.plugins import elevenlabs, silero

stt = elevenlabs.STT(
    model="scribe_v3_live",
    commit_strategy="turn_prediction",
    server_vad={"vad_silence_threshold_secs": 2.0},
    vad=silero.VAD.load(),
)

Set turn_handling={"turn_detection": "stt"} on AgentSession to use the server's commits as turn boundaries. server_vad is optional and configures the VAD fallback. Other models do not support turn_prediction.

Warning: With scribe_v3_live and turn_prediction, the server can force a segment commit after approximately 36 seconds of audio while the user is still speaking. Without a local vad passed to elevenlabs.STT, the plugin treats that commit as end of speech and can trigger an early agent response.

The optional local vad helps detect forced segment commits during long turns. The plugin keeps the turn open when the last turn probability is below 0.9, 34–38 seconds of audio have been sent since the previous server commit, and local VAD still detects speech. The plugin emits the final transcript immediately. This is a heuristic because the provider does not report why it committed.

If no new segment text arrives, the plugin emits end of speech after the server silence threshold plus 0.5 seconds (2.0 seconds with the server default). When new segment text arrives, the plugin cancels this fallback and waits for the segment's final transcript. The timer can expire even if background audio keeps local VAD in the speaking state. Without a local vad, automatic server commits continue to end speech. The plugin logs deferrals at DEBUG and fallback timeouts at WARNING. Before reconnecting, the plugin finishes any deferred turn. If local VAD fails, the plugin warns and disables the guard for that connection while transcription continues.

With a local vad, the first partial that emits start of speech enables a separate timeout for that fresh turn. If no commit arrives and VAD stays silent for the server silence threshold plus 0.5 seconds (2.0 seconds by default), the plugin emits end of speech. Further partials do not extend this deadline. VAD speech cancels the timer; when speech ends, a fresh silence window starts. A provider commit disables this guard for the rest of that turn, including continuations after a forced segment commit. The timeout does not promote partial text to a final transcript. It is limited to scribe_v3_live with an automatic commit strategy and is disabled if local VAD fails.

The other commit strategies are manual and vad. If commit_strategy is omitted, the plugin uses vad when server_vad is a dict and manual otherwise. An explicit strategy takes precedence over server_vad.

Use stt.update_options(commit_strategy=...) to change strategies. This reconnects active streams, so change strategies between turns. A stream-level strategy update applies to the owning STT and all its active streams.

Metadata

Release files for livekit-plugins-elevenlabs 1.9.1

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-elevenlabs 1.9.1
File Size Uploaded Provenance Actions
livekit_plugins_elevenlabs-1.9.1.tar.gz 31.5 kB With provenance Details for livekit_plugins_elevenlabs-1.9.1.tar.gz

Built distribution (wheel)

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

Total release size: 65.9 kB

Release files / livekit_plugins_elevenlabs-1.9.1.tar.gz

Download URL livekit_plugins_elevenlabs-1.9.1.tar.gz
Size 31.5 kB
Tags Source
SHA-256 checksum
How to use checksums
60f9480237d275a54d1797ef765f0323bee5b9af6d8661ae8b1b9da6765003e9
BLAKE2b-256 checksum
How to use checksums
062f1abc69cf2222b6abe4c9ef4bff4d61e36c03540a8da4e0f42783000eb6dd
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 Dec 2, 2026.

Transparency log

Release files / livekit_plugins_elevenlabs-1.9.1-py3-none-any.whl

Download URL livekit_plugins_elevenlabs-1.9.1-py3-none-any.whl
Size 34.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1da7e0f1c85a3bb5bf4ee5516cc3bf55853594d4babd7360485497c383b46b44
BLAKE2b-256 checksum
How to use checksums
5d1e6c05111e4f98d5096caaa7993cb55ede444efbad583eba405703f2a27bec
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 Dec 2, 2026.

Transparency log

Security for livekit-plugins-elevenlabs 1.9.1

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_elevenlabs-1.9.1.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 Dec 2, 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

1.9.1 This release

2 release files Full 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