code: def _split_wav_and_sentences(
      data_dir, trans_data, original_data, converted_data
  ):
      trans_dir = os.path.join(data_dir, trans_data)
      source_dir = os.path.join(data_dir, original_data)
      target_dir = os.path.join(data_dir, converted_data)
      if not os.path.exists(target_dir):
          os.makedirs(target_dir)
  
      files = []
  
      # Loop over transcription files and split corresponding wav
      for root, dirnames, filenames in os.walk(trans_dir):
          for filename in fnmatch.filter(filenames, "*.txt"):
              trans_file = os.path.join(root, filename)
              segments = _parse_transcriptions(trans_file)
  
              # Open wav corresponding to transcription file
              wav_filenames = [
                  os.path.splitext(os.path.basename(trans_file))[0]
                  + "_c"
                  + channel
                  + ".wav"
                  for channel in ["1", "2"]
              ]
              wav_files = [
                  os.path.join(source_dir, wav_filename)
                  for wav_filename in wav_filenames
              ]
  
              print(
                  "splitting {} according to {}".format(
                      wav_files, trans_file
                  )
              )
  
              origAudios = [
                  librosa.load(wav_file, sr=16000, mono=False)
                  for wav_file in wav_files
              ]
  
              # Loop over segments and split wav_file for each segment
              for segment in segments:
                  # Create wav segment filename
                  start_time = segment["start_time"]
                  stop_time = segment["stop_time"]
                  new_wav_filename = (
                      os.path.splitext(os.path.basename(trans_file))[0]
                      + "-"
                      + str(start_time)
                      + "-"
                      + str(stop_time)
                      + ".wav"
                  )
                  new_wav_file = os.path.join(
                      target_dir, new_wav_filename
                  )
  
                  channel = 0 if segment["speaker"] == "A:" else 1
                  _split_and_resample_wav(
                      origAudios[channel],
                      start_time,
                      stop_time,
                      new_wav_file,
                  )
  
                  new_wav_filesize = os.path.getsize(new_wav_file)
                  transcript = validate_label(segment["transcript"])
                  if transcript != None:
                      files.append(
                          (
                              os.path.abspath(new_wav_file),
                              new_wav_filesize,
                              transcript,
                          )
                      )
  
      return pandas.DataFrame(
          data=files,
          columns=["wav_filename", "wav_filesize", "transcript"],
      )
  
file_path: DeepSpeech/bin/import_fisher.py
imports: import codecs
  import fnmatch
  import os
  import random
  import subprocess
  import sys
  import unicodedata
  import librosa
  import pandas
  import soundfile
  from deepspeech_training.util.importers import validate_label_eng
label_desc: Use image node_id 4 for calling a global function with example usage: _split_wav_and_sentences(data_dir, trans_data, original_data, converted_data) and returns: pandas