code: def convert_dir_fs_wav_to_wav(
      audio_folder, sampling_rate, num_channels
  ):
      """
      This function converts the WAV files stored in a folder to WAV using a
      different sampling freq and number of channels.
      ARGUMENTS:
       - audio_folder:    the path of the folder where the WAVs are stored
       - sampling_rate:   the sampling rate of the generated WAV files
       - num_channels:    the number of channesl of the generated WAV files
      """
  
      types = (
          audio_folder + os.sep + "*.wav",
      )  # the tuple of file types
  
      files_list = []
      for files in types:
          files_list.extend(glob.glob(files))
  
      output_folder = (
          audio_folder
          + os.sep
          + "Fs"
          + str(sampling_rate)
          + "_"
          + "NC"
          + str(num_channels)
      )
      if os.path.exists(output_folder) and output_folder != ".":
          shutil.rmtree(output_folder)
      os.makedirs(output_folder)
  
      for f in files_list:
          _, filename = ntpath.split(f)
          command = (
              'avconv -i "'
              + f
              + '" -ar '
              + str(sampling_rate)
              + " -ac "
              + str(num_channels)
              + ' "'
              + output_folder
              + os.sep
              + filename
              + '"'
          )
          print(command)
          os.system(command)
  
file_path: pyAudioAnalysis/pyAudioAnalysis/audioBasicIO.py
imports: from __future__ import print_function
  import os
  import glob
  import aifc
  import eyed3
  import ntpath
  import shutil
  import numpy
  from pydub import AudioSegment
  from scipy.io import wavfile
label_desc: Use image node_id 2 for calling a global function with example usage: convert_dir_fs_wav_to_wav(audio_folder, sampling_rate, num_channels) without return types