code: def annotation2files(wavFile, csvFile):
      """
      Break an audio stream to segments of interest,
      defined by a csv file
  
      - wavFile:    path to input wavfile
      - csvFile:    path to csvFile of segment limits
  
      Input CSV file must be of the format <T1>\t<T2>\t<Label>
      """
  
      [Fs, x] = audioBasicIO.read_audio_file(wavFile)
      with open(csvFile, "r") as csvfile:
          reader = csv.reader(csvfile, delimiter="\t", quotechar="|")
          for j, row in enumerate(reader):
              T1 = float(row[0].replace(",", "."))
              T2 = float(row[1].replace(",", "."))
              label = "%s_%s_%.2f_%.2f.wav" % (wavFile, row[2], T1, T2)
              label = label.replace(" ", "_")
              xtemp = x[int(round(T1 * Fs)) : int(round(T2 * Fs))]
              wavfile.write(label, Fs, xtemp)
  
file_path: pyAudioAnalysis/pyAudioAnalysis/audacityAnnotation2WAVs.py
imports: import glob
  import os
  import audioBasicIO
  import sys
  import csv
  import scipy.io.wavfile
label_desc: Use image node_id 1 for calling a global function with example usage: annotation2files(wavFile, csvFile) without return types