Is there a way to stop routing LLM output to the T...
# agents
s
Is there a way to stop routing LLM output to the TTS node entirely (not just mute playback) so that TTS is never invoked when sound is off?
r
Have you tried hooking the tts_node? Something like this:
Copy code
async def tts_node(self, text: AsyncIterable[str], model_settings: ModelSettings):  
    # Check if sound is enabled (you'll need to track this state)  
    if not self.sound_enabled:  
        # Return early without invoking TTS  
        return None  
      
    # Call default TTS node when sound is enabled  
    return Agent.default.tts_node(self, text, model_settings)