tools/utilities/pythonlibs/audio/featurizer.py
def read(self):
        """ Read the next output from the featurizer """
        data = self.audio_source.read()
        if data is None:
            self.eof = True
            if self.output_window_size != 0 and self.frame_count % self.output_window_size != 0:
                # keep returning zeros until we fill the window size
                self.frame_count += 1
                return np.zeros((self.output_size))
            return None

        if self.logfile:
            self.logfile.write("{}\n".format(",".join([str(x) for x in data])))
        self.frame_count += 1 

        start_time = time.time()
        result = self.model.transform(data)
        
        now = time.time()
        diff = now - start_time
        self.total_time += diff
        return result
 Read the next output from the featurizer 
Read the next output from the featurizer
Read the next output from the featurizer
def read(self):
        data = self.audio_source.read()
        if data is None:
            self.eof = True
            if self.output_window_size != 0 and self.frame_count % self.output_window_size != 0:
                self.frame_count += 1
                return np.zeros((self.output_size))
            return None
        if self.logfile:
            self.logfile.write("{}\n".format(",".join([str(x) for x in data])))
        self.frame_count += 1 
        start_time = time.time()
        result = self.model.transform(data)
        now = time.time()
        diff = now - start_time
        self.total_time += diff
        return result
def read ( self ) : data = self . audio_source . read ( ) if data is None : self . eof = True if self . output_window_size != 0 and self . frame_count % self . output_window_size != 0 : self . frame_count += 1 return np . zeros ( ( self . output_size ) ) return None if self . logfile : self . logfile . write ( "{}\n" . format ( "," . join ( [ str ( x ) for x in data ] ) ) ) self . frame_count += 1 start_time = time . time ( ) result = self . model . transform ( data ) now = time . time ( ) diff = now - start_time self . total_time += diff return result
Read the next output from the featurizer
Read the next output from the featurizer
""" Read the next output from the featurizer """ # keep returning zeros until we fill the window size
self