When sending from the llm to the tts, does it spli...
# ask-ai
s
When sending from the llm to the tts, does it split by punctuation or what or send the whole test and does it start sending while the llm generating ?
t
Thanks for reaching out, Mostafa. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking whether LLM → TTS traffic is split by punctuation or sent as one block, and whether TTS starts while the LLM is still generating. Short answer: • Text is sent incrementally — it does not wait for the full LLM output. • TTS can start while the LLM is still generating. • Splitting often happens at the LLM's output stream boundaries; many setups buffer until sentence-ending punctuation (., !, ?) to produce more natural TTS, but base behavior will stream raw chunks as they arrive unless you add buffering logic. Do you want guidance on implementing punctuation-based buffering (example code or where to plug it in)? Sources: LLM-Powered Content Filter | LiveKit docs
s
What is the current default behaviour when sending to tts ?
t
You're asking for the current default behavior when sending LLM output to TTS. Default behavior: • The system uses a sentence tokenizer to split LLM output into sentence-sized segments (boundaries like
.
,
!
,
?
). • Each complete sentence is sent to TTS incrementally so audio can start as soon as a sentence is available (if the TTS provider supports streaming). • If the TTS provider does not support streaming, the full text is sent after the LLM finishes. • You can override this by customizing the
tts_node
to change buffering or chunking logic. Would you like an example of sentence-buffering code or guidance on switching to chunked-by-token streaming instead? Sources: Pipeline nodes and hooks | LiveKit docs