creamy-tiger-14805
10/25/2025, 8:17 AMtall-airline-16756
10/25/2025, 8:18 AMtall-airline-16756
10/25/2025, 8:18 AMVoicePipelineAgent lets you tweak the text just before it goes to the TTS engine. For instance, you can clean up or enrich the output by replacing or removing certain tags or phrases to make it sound just right.
• Overriding `llm_node`: If you want more detailed control, you can subclass the Agent and override the llm_node method. This way, you can manipulate the raw LLM output stream before it reaches the TTS stage.
• Combining llm_node and `tts_node`: For those working with structured outputs, defining a schema to separate TTS control directives from spoken content allows you to apply voice instructions dynamically and seamlessly.
All these methods work smoothly with LiveKit’s TTS pipeline, so your changes will be reflected throughout the audio generation process. If you'd like, I’d be happy to share some detailed examples or help you implement any of these approaches—just let me know!
Sources: Docs::Agents | Pipeline nodes and hooks | LiveKit Docs | chain-of-thought-tts/agent.py | pipeline-llm/replacing_llm_output.py | Modifying LLM output before TTS | LiveKit Docs