feat(elevenlabs): support keyterms, no_verbatim, enable_logging on STT realtime#5618
Open
BkSouX wants to merge 2 commits intolivekit:mainfrom
Open
feat(elevenlabs): support keyterms, no_verbatim, enable_logging on STT realtime#5618BkSouX wants to merge 2 commits intolivekit:mainfrom
BkSouX wants to merge 2 commits intolivekit:mainfrom
Conversation
hamitmervan
reviewed
May 3, 2026
| Each keyterm can contain at most 5 words and must be less than 50 characters. | ||
| Maximum of 100 keyterms. Only supported for Scribe v2 batch recognition | ||
| (not realtime streaming). Usage incurs additional costs. | ||
| Maximum of 100 keyterms. Supported for Scribe v2 batch recognition and for the |
There was a problem hiding this comment.
An informational correction on the comment:
The keyterms docstring says "Maximum of 100 keyterms, each less than 50 characters" for both batch and realtime, but the ElevenLabs API reference for the realtime endpoint documents maximum 50 keyterms, each up to 20 characters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The ElevenLabs Scribe v2 realtime STT API exposes three query parameters that the plugin does not currently forward to the WebSocket connection:
keyterms— biases recognition toward domain terms (already accepted inSTT.__init__but only used for batch recognition).no_verbatim— strips filler words and disfluencies from the transcript.enable_logging— set tofalseto enable zero-retention mode (useful for privacy/compliance-sensitive deployments).This PR wires all three through
STTOptions,STT.__init__,STT.update_options, andSpeechStream._connect_ws, and updates thekeytermsdocstring to reflect realtime support.Changes
livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/stt.py:no_verbatimandenable_loggingtoSTTOptions,STT.__init__,STT.update_options.keytermsvalues (onekeyterms=<term>per item) and appendno_verbatim/enable_loggingto the realtime query string in_connect_ws.keytermsdocstring (was: "Only supported for Scribe v2 batch recognition (not realtime streaming)").tests/test_plugin_elevenlabs_stt.py: 12 new unit tests covering defaults, constructor,update_options, and realtime query-string construction (no API key required).Test plan
ruff checkandruff format --checkpassmypypasses on the modified plugin sourcepytest tests/test_plugin_elevenlabs_stt.py— 12/12 passingNotes
tokenandcommit_strategyquery params are not added: the former is only relevant for client-side single-use auth (the plugin usesxi-api-key), and the latter is already derived fromserver_vad.CONTRIBUTING.md.