tools/utilities/pythonlibs/audio/training/model_editor.py
def add_vad(self, rnn, sample_rate, window_size, tau_up, tau_down, large_input, gain_att, threshold_up, threshold_down, level_threshold):
        """
        Add a VoiceActivityDetectorNode as the "resetTrigger" input to the given RNN, LSTM or GRU node.
        """
        frame_duration = float(window_size) / float(sample_rate)
        reset_port = rnn.GetInputPort("resetTrigger")
        name = reset_port.GetParentNodes().Get().GetRuntimeTypeName()
        if not "VoiceActivityDetector" in name:
            # replace dummy trigger with VAD node
            if not self.vad_node:
                input_port = rnn.GetInputPort("input")
                input_node = input_port.GetParentNodes().Get()
                self.vad_node = self.builder.AddVoiceActivityDetectorNode(self.model,                 
                                ell.nodes.PortElements(input_node.GetOutputPort("output")),
                                sample_rate, frame_duration, tau_up, tau_down, 
                                large_input, gain_att, threshold_up, 
                                threshold_down, level_threshold)
            # make the vad node the "resetTrigger" input of this rnn node
            reset_output = ell.nodes.PortElements(self.vad_node.GetOutputPort("output"))
            self.builder.ResetInput(rnn, reset_output, "resetTrigger")
            return True
        return False

        Add a VoiceActivityDetectorNode as the "resetTrigger" input to the given RNN, LSTM or GRU node.
        
Add a VoiceActivityDetectorNode as the "resetTrigger" input to the given RNN, LSTM or GRU node.
Add a VoiceActivityDetectorNode as the " resetTrigger " input to the given RNN LSTM or GRU node .
def add_vad(self, rnn, sample_rate, window_size, tau_up, tau_down, large_input, gain_att, threshold_up, threshold_down, level_threshold):
        frame_duration = float(window_size) / float(sample_rate)
        reset_port = rnn.GetInputPort("resetTrigger")
        name = reset_port.GetParentNodes().Get().GetRuntimeTypeName()
        if not "VoiceActivityDetector" in name:
            if not self.vad_node:
                input_port = rnn.GetInputPort("input")
                input_node = input_port.GetParentNodes().Get()
                self.vad_node = self.builder.AddVoiceActivityDetectorNode(self.model,                 
                                ell.nodes.PortElements(input_node.GetOutputPort("output")),
                                sample_rate, frame_duration, tau_up, tau_down, 
                                large_input, gain_att, threshold_up, 
                                threshold_down, level_threshold)
            reset_output = ell.nodes.PortElements(self.vad_node.GetOutputPort("output"))
            self.builder.ResetInput(rnn, reset_output, "resetTrigger")
            return True
        return False
def add_vad ( self , rnn , sample_rate , window_size , tau_up , tau_down , large_input , gain_att , threshold_up , threshold_down , level_threshold ) : frame_duration = float ( window_size ) / float ( sample_rate ) reset_port = rnn . GetInputPort ( "resetTrigger" ) name = reset_port . GetParentNodes ( ) . Get ( ) . GetRuntimeTypeName ( ) if not "VoiceActivityDetector" in name : if not self . vad_node : input_port = rnn . GetInputPort ( "input" ) input_node = input_port . GetParentNodes ( ) . Get ( ) self . vad_node = self . builder . AddVoiceActivityDetectorNode ( self . model , ell . nodes . PortElements ( input_node . GetOutputPort ( "output" ) ) , sample_rate , frame_duration , tau_up , tau_down , large_input , gain_att , threshold_up , threshold_down , level_threshold ) reset_output = ell . nodes . PortElements ( self . vad_node . GetOutputPort ( "output" ) ) self . builder . ResetInput ( rnn , reset_output , "resetTrigger" ) return True return False
Add a VoiceActivityDetectorNode as the "resetTrigger" input to the given RNN, LSTM or GRU node.
Add a VoiceActivityDetectorNode as the " resetTrigger " input to the given RNN LSTM or GRU node .
"""
        Add a VoiceActivityDetectorNode as the "resetTrigger" input to the given RNN, LSTM or GRU node.
        """ # replace dummy trigger with VAD node # make the vad node the "resetTrigger" input of this rnn node
self
rnn
sample_rate
window_size
tau_up
tau_down
large_input
gain_att
threshold_up
threshold_down
level_threshold