why is my tts aligned transcript not working on in...
# ask-ai
k
why is my tts aligned transcript not working on interruptions when i'm using elevenlabs with the relevant settings enabled?
t
Thanks for reaching out, Ethan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd love to help you out! Could you please share a bit more about your setup? For example: • Which settings have you enabled for ElevenLabs? • Are you seeing any specific error messages or noticing certain behaviors when interruptions happen? • Which platform or integration are you using for the TTS aligned transcripts? Knowing these details will really help me understand what's going on and guide you in the best way possible.
k
• all the default settings • no errors, just seeing that when i interrupt the agent the committed transcript doesn't cut off where it should • not sure what you mean by which platform or integration. I just have use_tts_aligned_transcript as True in agentsession
t
I'm here to help you understand the issue with the committed transcript not cutting off correctly during interruptions when using ElevenLabs and
use_tts_aligned_transcript
set to True. This can happen for a few reasons, so let's walk through them together: • Missing or Incorrect Synchronized Transcript: The truncation relies on the
playback_ev.synchronized_transcript
value from the
audio_output.wait_for_playout()
event. If this value is missing or empty during interruptions, the transcript might not update as expected. • TTS Provider Behavior: ElevenLabs does support aligned transcription, but whether synchronized transcripts are available during interruptions depends on how the backend is implemented. • Audio Output Buffer Issues: Sometimes, if the audio output system doesn’t emit a valid playback event with the synchronized transcript after an interruption, the system may default to showing the full text. • Timing or Race Conditions: If an interruption happens before the first audio frame plays, the system might consider the synchronized transcript invalid. • Configuration Misalignment: It’s important to double-check that
sync_alignment=True
is set in your ElevenLabs TTS configuration to enable the aligned transcript feature. To help you debug this, here are some steps you can try: 1. Log the incoming
TimedString
chunks in your transcription node to see if the word-level timing data is coming through correctly. 2. Take a close look at the
playback_finished
event on the audio output to check for synchronized transcript and playback position values during interruptions. 3. Try testing with a controlled scenario to confirm if the synchronized transcript is properly set in the
PlaybackFinishedEvent
. 4. Review LiveKit logs or metrics to verify whether the
playback_ev.synchronized_transcript
is populated when interruptions occur. If you find that the synchronized transcript is missing, the issue might be related to how the TTS plugin handles partial audio streams or how the playout system manages truncation. Please feel free to reach out if you want to go through these steps together or if you have any other questions—I’m here to support you! Sources: ElevenLabs TTS plugin guide | LiveKit Docs | tests/test_agent_session.py | Text and transcriptions | LiveKit Docs