Exemplo n.º 1
0
 def analyze(self, analyzer, config, save=True):
     """
     Function analyzing all files of the dataset.
     Each file is dealt with as a Recording object, created, analyzed and
     saved.
     See Recording.analyze for more info.
     """
     if self._verbatim > 0:
         print('\n\n *** DATASET ANALYSIS ***')
     tStartGlobal = time.time()
     for file_path in self.files:
         recording = Recording(file_path, config, verbatim=self._verbatim)
         tStart = time.time()
         recording.analyze(analyzer, config)
         tEnd = time.time()
         if self._verbatim > 1:
             print('\tRecording has been analyzed', file_path,
                   tEnd - tStart)
         if save:
             recording.save(config)
             if self._verbatim > 1:
                 print('\tRecording has been saved')
     tEndGlobal = time.time()
     if self._verbatim > 0:
         print('Dataset has been analyzed', tEndGlobal - tStartGlobal)
     return