Skip to content

feat(elevenlabs): add noVerbatim STT option#1769

Open
rosetta-livekit-bot[bot] wants to merge 1 commit into
1.5.0from
cloves-rebuff-feebler
Open

feat(elevenlabs): add noVerbatim STT option#1769
rosetta-livekit-bot[bot] wants to merge 1 commit into
1.5.0from
cloves-rebuff-feebler

Conversation

@rosetta-livekit-bot

@rosetta-livekit-bot rosetta-livekit-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add ElevenLabs STT noVerbatim option for batch recognition form data
  • include no_verbatim in realtime websocket params and propagate updateOptions to active streams
  • add a changeset for the public plugin option

Testing

  • pnpm exec prettier --check plugins/elevenlabs/src/stt.ts
  • pnpm --filter @livekit/agents build
  • pnpm --filter @livekit/agents-plugin-elevenlabs build
  • pnpm --filter @livekit/agents-plugin-elevenlabs lint
  • pnpm test -- plugins/elevenlabs/src/stt.test.ts

Notes

  • pnpm --filter @livekit/agents-plugin-elevenlabs api:check exits non-zero because existing API Extractor warnings are configured as failures; no new API report is tracked because the package report path is ignored by the repo.

Ported from livekit/agents#6032

Original PR description

Summary

Exposes ElevenLabs' no_verbatim speech-to-text option in the plugin. When enabled, the model removes filler words, false starts and disfluencies from the transcript, producing cleaner output.

Both Scribe v2 (batch) and Scribe v2 realtime support this flag (it's a documented STT parameter — a form field for batch and a websocket query parameter for realtime), but the plugin previously had no way to set it.

Changes

  • Add no_verbatim: bool = False to STT.__init__ and STTOptions (documented).
  • Batch recognition (_recognize_impl): add the no_verbatim form field when enabled.
  • Realtime (_connect_ws): append no_verbatim=true to the websocket query params when enabled.
  • update_options: allow toggling no_verbatim at runtime.
  • Add unit tests (tests/test_plugin_elevenlabs_stt.py) covering default, enabling, and update_options.

Why

Spontaneous speech transcripts carry heavy disfluency ("eh", "mmm", false starts) that degrades downstream LLM consumers (e.g. classification/scoring over the transcript). no_verbatim lets the STT clean this at the source. Default remains False, so behavior is unchanged unless opted in.

Notes

  • ruff check and ruff format pass (per CONTRIBUTING).
  • Default False → no behavior change for existing users.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4655ac8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 34 packages
Name Type
@livekit/agents-plugin-elevenlabs Major
@livekit/agents Major
@livekit/agents-plugin-anam Major
@livekit/agents-plugin-assemblyai Major
@livekit/agents-plugin-baseten Major
@livekit/agents-plugin-bey Major
@livekit/agents-plugin-cartesia Major
@livekit/agents-plugin-cerebras Major
@livekit/agents-plugin-deepgram Major
@livekit/agents-plugin-fishaudio Major
@livekit/agents-plugin-google Major
@livekit/agents-plugin-hedra Major
@livekit/agents-plugin-hume Major
@livekit/agents-plugin-inworld Major
@livekit/agents-plugin-lemonslice Major
@livekit/agents-plugin-liveavatar Major
@livekit/agents-plugin-livekit Major
@livekit/agents-plugin-minimax Major
@livekit/agents-plugin-mistral Major
@livekit/agents-plugin-mistralai Major
@livekit/agents-plugin-neuphonic Major
@livekit/agents-plugin-openai Major
@livekit/agents-plugin-perplexity Major
@livekit/agents-plugin-phonic Major
@livekit/agents-plugin-resemble Major
@livekit/agents-plugin-rime Major
@livekit/agents-plugin-runway Major
@livekit/agents-plugin-sarvam Major
@livekit/agents-plugin-silero Major
@livekit/agents-plugin-soniox Major
@livekit/agents-plugin-tavus Major
@livekit/agents-plugin-trugen Major
@livekit/agents-plugin-xai Major
@livekit/agents-plugins-test Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment on lines +708 to +710
if (this.#opts.noVerbatim) {
params.push('no_verbatim=true');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 keyterms not propagated to streaming WebSocket — pre-existing asymmetry

The keyterms option is only used in batch mode (#recognizeImpl at line 348-351) and is NOT added to the WebSocket URL params in #connectWs. In contrast, noVerbatim is correctly sent in both batch and streaming modes. If ElevenLabs' realtime API supports keyterms, this would be a pre-existing gap unrelated to this PR. The updateOptions method also doesn't propagate keyterms changes to streams, consistent with it being batch-only.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants