gentle-jackal-95631
11/14/2025, 12:33 AMtall-airline-16756
11/14/2025, 12:33 AMtall-airline-16756
11/14/2025, 12:34 AMuse_tts_aligned_transcript=True setting! When you enable this, it helps improve the synchronization between the transcription output and the actual speech timing you see in the frontend. This means the transcribed text matches up more closely with the audio, making your experience much smoother and more natural. For TTS providers like Cartesia or ElevenLabs, it even supports word-level synchronization, while for others like LiveKit Inference, it offers sentence-level alignment.
Just a quick heads-up: depending on the TTS provider you’re using, turning on this feature might cause a little loss in the original text formatting. But overall, it’s designed to give you a more cohesive and enjoyable experience. If you have any questions or need help with this, feel free to reach out—I’m here to help!
Sources: ElevenLabs TTS plugin guide | LiveKit Docs | Text and transcriptions | LiveKit docs | Cartesia TTS plugin guide | LiveKit Docsgentle-jackal-95631
11/14/2025, 12:35 AMtall-airline-16756
11/14/2025, 12:35 AMuse_tts_aligned_transcript=True, the TTS system creates a synchronized stream of TimedString objects. These contain the text along with start and end timestamps, replacing the original LLM-generated text in the output pipeline. Here’s how it works step-by-step:
• The LLM generates a response as a text stream.
• This text is sent to the TTS system for audio synthesis.
• If alignment is turned on, the TTS system returns both the audio stream and the timestamped text.
• The timestamped text then goes through the transcription_node, which can process or transform it before sending it to the frontend.
• The original LLM-generated text is not shown on the display but may still be used internally to manage the chat context.
It’s important to know that the aligned transcription isn’t sent back to the LLM. Instead, it’s forwarded to the frontend at the same time as the audio is generated, ensuring everything stays perfectly in sync in real-time. This really helps improve the user experience by matching the displayed text exactly with the audio playback.
Sources: Text and transcriptions | LiveKit docs | Cartesia TTS plugin guide | LiveKit Docs | ElevenLabs TTS plugin guide | LiveKit Docs | examples/voice_agents/structured_output.py | Pipeline nodes and hooks | LiveKit docs