What is the difference between inference and pipel...
# ask-ai
a
What is the difference between inference and pipeline nodes? Can we use either of them to implement our custom components?
t
Thanks for reaching out, Anushkaa. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm glad you asked about the difference between inference and pipeline nodes in LiveKit! Let me walk you through it: • Inference: This is all about running AI models like STT, LLM, or TTS in real-time—for example, transcribing speech, generating responses, or creating audio. It focuses on what models are being used and how they’re called upon. • Pipeline Nodes: These are flexible parts of the agent’s processing pipeline where you can jump in to customize behavior at each step (like STT, LLM, or TTS). They focus on how the pipeline works and let you add your own logic or swap in different models. If you want to build your own custom components, pipeline nodes are the way to go! You can override nodes like
stt_node()
,
llm_node()
, or
tts_node()
to do things like filter content, bring in extra context, or even switch TTS voices on the fly. Feel free to reach out if you'd like me to share some examples or dive deeper into customizing specific nodes—I’m here to help! Sources: docs/index.yaml | Agents v0.x migration guide - Node.js | LiveKit Docs | Pipeline nodes and hooks | LiveKit docs | livekit-agents/livekit/agents/voice/agent_activity.py | Agents v0.x migration guide - Python | LiveKit docs