code: def directory_feature_extraction_no_avg(
      folder_path, mid_window, mid_step, short_window, short_step
  ):
      """
      This function extracts the mid-term features of the WAVE
      files of a particular folder without averaging each file.
  
      ARGUMENTS:
          - folder_path:          the path of the WAVE directory
          - mid_window, mid_step:    mid-term window and step (in seconds)
          - short_window, short_step:    short-term window and step (in seconds)
      RETURNS:
          - X:                A feature matrix
          - Y:                A matrix of file labels
          - filenames:
      """
  
      wav_file_list = []
      signal_idx = np.array([])
      mid_features = np.array([])
      types = ("*.wav", "*.aif", "*.aiff", "*.ogg")
      for files in types:
          wav_file_list.extend(
              glob.glob(os.path.join(folder_path, files))
          )
  
      wav_file_list = sorted(wav_file_list)
  
      for i, file_path in enumerate(wav_file_list):
          sampling_rate, signal = audioBasicIO.read_audio_file(
              file_path
          )
          if sampling_rate == 0:
              continue
          signal = audioBasicIO.stereo_to_mono(signal)
          mid_feature_vector, _, _ = mid_feature_extraction(
              signal,
              sampling_rate,
              round(mid_window * sampling_rate),
              round(mid_step * sampling_rate),
              round(sampling_rate * short_window),
              round(sampling_rate * short_step),
          )
  
          mid_feature_vector = np.transpose(mid_feature_vector)
          if len(mid_features) == 0:  # append feature vector
              mid_features = mid_feature_vector
              signal_idx = np.zeros((mid_feature_vector.shape[0],))
          else:
              mid_features = np.vstack(
                  (mid_features, mid_feature_vector)
              )
              signal_idx = np.append(
                  signal_idx,
                  i * np.ones((mid_feature_vector.shape[0],)),
              )
  
      return mid_features, signal_idx, wav_file_list
  
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 5 for calling a global function with example usage: directory_feature_extraction_no_avg(folder_path, mid_window, mid_step, short_window, short_step) and returns: mid_features,  signal_idx,  wav_file_list