can we use the livekti interrupt api to interrupt ...
# ask-ai
c
can we use the livekti interrupt api to interrupt tts output mid eneration?
✅ 1
t
Thanks for reaching out, Faraz. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your question about interrupting TTS mid-generation. Yes. You can use LiveKit’s interrupt API to stop TTS output while it’s being generated. Use
AgentActivity.interrupt()
(Python/Node) or
session.interrupt()
/
handle.interrupt()
to cancel the current synthesis and clear queued speeches. Note the speech must allow interruptions (
allow_interruptions=True
, which is the default) for interruption to take effect. Would you like a short code example for your language (Node or Python) or guidance on handling interruption events? Sources: examples/voice_agents | livekit/livekit_composite | DeepWiki | Turns overview | LiveKit Documentation | Function tool definition | LiveKit Documentation, with interactive elements