Pipeline Nodes, Hooks & Custom Logic
Control every stage of the voice pipeline
Override every stage of the voice pipeline: STT preprocessing, structured LLM output, emotional TTS, RAG injection, content filtering, and realtime model nodes.
What You Build
Chain-of-thought agent with structured JSON output, emotional TTS, content filtering, RAG injection, and full pipeline customization.
Prerequisites
- →Course 1.1
- →Course 2.1
The voice pipeline architecture
20mFull pipeline diagram, async generators, and how Agent.default wires everything together.
stt_node: audio preprocessing
20mOverride stt_node to preprocess audio, filter noise, or detect keywords before transcription.
llm_node: structured output
25mOverride llm_node for structured JSON output with TypedDict schemas and streaming parsing.
tts_node: emotional speech
20mOverride tts_node for emotional speech with dynamic TTS instructions and pronunciation control.
on_user_turn_completed: RAG injection
25mInject RAG context into the conversation by overriding on_user_turn_completed.
Content filtering
20mBuild content filters: simple keyword-based and LLM-powered, plus transcription node overrides.
Realtime model nodes
20mOverride realtime model nodes for custom audio output processing.
Full assembly
20mAssemble the complete chain-of-thought agent with all customizations, tests, and metrics.
What You Walk Away With
Complete mastery of LiveKit's voice pipeline architecture. Ability to customize any stage for specialized use cases.