i have overridden stt_node in my agent and i have ...
# ask-ai
c
i have overridden stt_node in my agent and i have used agent.default.stt multiple times there. is it correct
✅ 1
t
Thanks for reaching out, Kushagra. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding about your override of
stt_node
and whether calling
Agent.default.stt
multiple times there is correct. You should call the default STT implementation once per audio stream. The supported pattern is to override
stt_node
, optionally preprocess the audio stream, call
Agent.default.stt_node(...)
a single time to produce speech events, then optionally postprocess those events. Calling
Agent.default.stt_node
multiple times risks reprocessing the same stream or violating stream-consumption assumptions and is not recommended. If you’d like, share the relevant code snippet (the
stt_node
override) and I’ll review it and suggest how to refactor to a single
Agent.default.stt_node
call. Sources: Pipeline nodes and hooks | LiveKit Documentation, with interactive elements