when I use the elevenlabs plugin it just keeps cut...
# ask-ai
s
when I use the elevenlabs plugin it just keeps cutting off mid sentence for some reason, it doesnt happen with livekit inference why?
t
Thanks for reaching out, Faruk. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're seeing ElevenLabs cut off mid-sentence because its plugin setup is likely using more aggressive endpointing/VAD settings than LiveKit Inference, which uses server-side turn detection tuned to avoid false cutoffs. What to check and try next: • Which turn-detection mode are you using? If it's VAD-only, switch
turn_detection
to
realtime_llm
or a custom EOU model. • Increase endpointing delays: raise
min_endpointing_delay
and/or
max_endpointing_delay
. • Tune VAD silence thresholds: increase
min_silence_duration
so short pauses aren't treated as end-of-utterance. • Review interruption settings: check
min_interruption_duration
and
min_interruption_words
so mid-sentence speech doesn't trigger an interruption. • If the ElevenLabs plugin supports it, enable TTS-aligned transcripts (
use_tts_aligned_transcript=True
) to improve timing alignment. If you want, share your AgentSession config (turn detection, VAD settings, endpointing values) and a short example audio scenario and I’ll recommend exact values to try. Sources: How does end-of-utterance detection work in conversations? | ElevenLabs TTS | LiveKit Docs | examples/voice_agents | livekit/livekit_composite | DeepWiki | Improving voice AI's turn detection with transformers | ElevenLabs TTS plugin guide | LiveKit Docs
s
can you check if this is an issue?
t
Thanks — I can help check this. To determine whether it’s a bug or a configuration issue, could you share the following so I can diagnose it precisely? • Your ElevenLabs plugin configuration (especially
use_tts_aligned_transcript
if present). • Your AgentSession / turn detection settings (values for
turn_detection
,
min_silence_duration
,
min_endpointing_delay
,
max_endpointing_delay
,
min_interruption_duration
,
min_interruption_words
). • Whether you’re using a VAD (which one) or STT-based endpointing. • A short sample log or transcript showing a cut-off (timestamps if possible). • Whether this happens for all voices or only specific ElevenLabs voices, and if LiveKit Inference behaves correctly in the same environment. If you prefer, paste the relevant config and one example log line and I’ll point out the most likely parameters to change.
s
llm=google.LLM( model="gemini-2.5-flash", vertexai=True, location="europe-west3", ), tts=elevenlabs.TTS( voice_id="cgSgspJ2msm6clMCkdW9", model="eleven_flash_v2_5", language="nl", ), vad=ctx.proc.userdata["vad"], preemptive_generation=True, use_tts_aligned_transcript=True, min_endpointing_delay=0.2, max_endpointing_delay=1.5, min_interruption_duration=0.3, false_interruption_timeout=1.2, resume_false_interruption=True, allow_interruptions=True, min_interruption_words=0, user_away_timeout=8.0, userdata=session_context, ) Goedendag, ik ben G {"pid": 59636, "job_id": its cut off something is happening, every sentence is cut off to max3-4 words
t
Thanks — I see the configuration you shared and the sample where speech is cut to 3–4 words. Here’s what’s happening and concrete changes to try. Why it’s cutting off • Your setup is using VAD-driven endpointing with short endpointing delays (
min_endpointing_delay=0.2
,
max_endpointing_delay=1.5
) and a short
min_silence_duration
likely set in your
vad
(not shown). Short delays + sensitive VAD cause brief pauses inside sentences to be treated as utterance ends, producing 3–4 word cutoffs. •
min_interruption_words=0
and
min_interruption_duration=0.3
make the session accept very short incoming speech as valid interruptions, which can prematurely stop TTS or transcription. •
use_tts_aligned_transcript=True
helps sync timing but won’t prevent VAD from endpointing if thresholds are low. Immediate changes to try (apply one at a time, test after each) 1. Increase endpointing delays: ◦ Set
min_endpointing_delay
to 0.5–0.8 ◦ Set
max_endpointing_delay
to 3.0–5.0 1. Relax VAD silence threshold: ◦ Increase
min_silence_duration
in your
vad
to ~0.6–0.8s (if currently lower). This prevents short intra-sentence pauses from triggering endpointing. 1. Harden interruption gating: ◦ Set
min_interruption_words
to 2–3 ◦ Increase
min_interruption_duration
to 0.5–0.8s ◦ Keep
false_interruption_timeout=1.2
and
resume_false_interruption=True
as-is for now. 1. Temporarily disable aggressive preemption: ◦ Try
preemptive_generation=False
to check if generation preemption is contributing to cutoffs. 1. Test with LiveKit-style turn detection: ◦ If possible, set
turn_detection
to
realtime_llm
(or the server-side EOU model) instead of VAD-only to get semantic endpointing behavior. What to send me if it still cuts off • Your
vad
settings (exact
min_silence_duration
value). • A short log showing timestamps around a cutoff or the raw audio snippet. • Whether the cutoffs occur only for Dutch (
language="nl"
) or also in other languages. Would you like me to suggest exact values to paste into your config for a quick test?
s
its not random its structured cutoff at 3-4 words and also I am not even talking, also my logs dont even show an intterputed event
t
Thanks — I’ve reviewed your config and the symptom (consistent 3–4 word cutoffs with no interruption events). That pattern points away from VAD/interruption and toward TTS streaming, session state, or audio routing. Let’s check a few focused things quickly so I can pinpoint the cause. Please do these three quick tests and paste results/log lines: 1) Disable audio input during agent playback • While reproducing, run:
Copy code
session.input.setAudioEnabled(False)
• Paste any log lines around the cutoff (10s before/after). Tell me whether the cutoffs stop. 2) Run ElevenLabs TTS standalone • Synthesize a longer test phrase directly with the plugin (no session):
Copy code
await elevenlabs.TTS().synthesize("Dit is een langere testzin om te controleren op afkap.")
• Tell me whether that output is cut off. 3) Enable debug logging for TTS + Agent activity • Enable debug logs for these components and share the excerpts around the cutoff: ◦
livekit.plugins.elevenlabs.TTS
◦
livekit.agents.voice.AgentActivity
• Look for any
END_OF_SPEECH
,
END_OF_UTTERANCE
,
agent_false_interruption
, or TTS streaming/metrics events. If those tests still show the 3–4 word cutoff, also send: • The
vad
object settings (especially
min_silence_duration
). • Any TTS plugin parameters not shown (e.g.,
streaming_latency
,
chunk_length_schedule
,
tts_node
overrides). I’ll analyze the logs and suggest an exact config change or next step. Would you like me to provide the exact commands to enable debug logging for your environment? Sources: Turn detection and interruptions | LiveKit Docs | examples/voice_agents | livekit/livekit_composite | DeepWiki | Agents Framework | livekit/livekit_composite | DeepWiki | ElevenLabs TTS plugin guide | LiveKit Docs | Agent speech and audio | LiveKit docs