miniature-nail-35141
09/10/2025, 5:08 PMtall-airline-16756
09/10/2025, 5:08 PMtall-airline-16756
09/10/2025, 5:09 PMstt_node
and tts_node
from a session, here’s a friendly guide you can follow:
1. Accessing the STT and TTS Models:
• You can use session.stt
and session.tts
to get the actual Speech-to-Text (STT) and Text-to-Speech (TTS) model instances that are being used in your session.
# Python Example
stt_model = session.stt # STT model instance
tts_model = session.tts # TTS model instance
2. Accessing the Pipeline Node Methods:
• The stt_node
and tts_node
are methods defined on the agent linked to your session. These represent the pipeline processing nodes you’ll work with.
# Python Example
agent = session.current_agent # Get the active agent
stt_node_func = agent.stt_node
tts_node_func = agent.tts_node
If anything feels unclear or if you’d like me to walk you through any part, please don’t hesitate to ask—I’m here to help!
Sources: livekit-agents/livekit/agents/voice/agent_session.py | agents/src/voice/agent_activity.ts | Pipeline nodes and hooks | LiveKit Docs | Pipeline nodes and hooks | LiveKit Docs