code: def multiple_directory_feature_extraction(
      path_list,
      mid_window,
      mid_step,
      short_window,
      short_step,
      compute_beat=False,
  ):
      """
      Same as dirWavFeatureExtraction, but instead of a single dir it
      takes a list of paths as input and returns a list of feature matrices.
      EXAMPLE:
      [features, classNames] =
             a.dirsWavFeatureExtraction(['audioData/classSegmentsRec/noise',
                                         'audioData/classSegmentsRec/speech',
                                         'audioData/classSegmentsRec/brush-teeth',
                                         'audioData/classSegmentsRec/shower'], 1,
                                         1, 0.02, 0.02);
  
      It can be used during the training process of a classification model ,
      in order to get feature matrices from various audio classes (each stored in
      a separate path)
      """
  
      # feature extraction for each class:
      features = []
      class_names = []
      file_names = []
      for i, d in enumerate(path_list):
          f, fn, feature_names = directory_feature_extraction(
              d,
              mid_window,
              mid_step,
              short_window,
              short_step,
              compute_beat=compute_beat,
          )
          if f.shape[0] > 0:
              # if at least one audio file has been found in the provided folder:
              features.append(f)
              file_names.append(fn)
              if d[-1] == os.sep:
                  class_names.append(d.split(os.sep)[-2])
              else:
                  class_names.append(d.split(os.sep)[-1])
      return features, class_names, file_names
  
file_path: pyAudioAnalysis/pyAudioAnalysis/MidTermFeatures.py
imports: from __future__ import print_function
  import os
  import time
  import glob
  import numpy
  import matplotlib.pyplot
  import sys
  from pyAudioAnalysis import utilities
  from pyAudioAnalysis import audioBasicIO
  from pyAudioAnalysis import ShortTermFeatures
label_desc: Use image node_id 4 for calling a global function with example usage: multiple_directory_feature_extraction(path_list, mid_window, mid_step, short_window, short_step, compute_beat) and returns: features,  class_names,  file_names