code: def _download_and_preprocess_data(data_dir):
      # Assume data_dir contains extracted LDC2004S13, LDC2004T19, LDC2005S13, LDC2005T19
  
      # Conditionally convert Fisher sph data to wav
      _maybe_convert_wav(data_dir, "LDC2004S13", "fisher-2004-wav")
      _maybe_convert_wav(data_dir, "LDC2005S13", "fisher-2005-wav")
  
      # Conditionally split Fisher wav data
      all_2004 = _split_wav_and_sentences(
          data_dir,
          original_data="fisher-2004-wav",
          converted_data="fisher-2004-split-wav",
          trans_data=os.path.join(
              "LDC2004T19", "fe_03_p1_tran", "data", "trans"
          ),
      )
      all_2005 = _split_wav_and_sentences(
          data_dir,
          original_data="fisher-2005-wav",
          converted_data="fisher-2005-split-wav",
          trans_data=os.path.join(
              "LDC2005T19", "fe_03_p2_tran", "data", "trans"
          ),
      )
  
      # The following files have incorrect transcripts that are much longer than
      # their audio source. The result is that we end up with more labels than time
      # slices, which breaks CTC.
      all_2004.loc[
          all_2004["wav_filename"].str.endswith(
              "fe_03_00265-33.53-33.81.wav"
          ),
          "transcript",
      ] = "correct"
      all_2004.loc[
          all_2004["wav_filename"].str.endswith(
              "fe_03_00991-527.39-528.3.wav"
          ),
          "transcript",
      ] = "that's one of those"
      all_2005.loc[
          all_2005["wav_filename"].str.endswith(
              "fe_03_10282-344.42-344.84.wav"
          ),
          "transcript",
      ] = "they don't want"
      all_2005.loc[
          all_2005["wav_filename"].str.endswith(
              "fe_03_10677-101.04-106.41.wav"
          ),
          "transcript",
      ] = "uh my mine yeah the german shepherd pitbull mix he snores almost as loud as i do"
  
      # The following file is just a short sound and not at all transcribed like provided.
      # So we just exclude it.
      all_2004 = all_2004[
          ~all_2004["wav_filename"].str.endswith(
              "fe_03_00027-393.8-394.05.wav"
          )
      ]
  
      # The following file is far too long and would ruin our training batch size.
      # So we just exclude it.
      all_2005 = all_2005[
          ~all_2005["wav_filename"].str.endswith(
              "fe_03_11487-31.09-234.06.wav"
          )
      ]
  
      # The following file is too large for its transcript, so we just exclude it.
      all_2004 = all_2004[
          ~all_2004["wav_filename"].str.endswith(
              "fe_03_01326-307.42-307.93.wav"
          )
      ]
  
      # Conditionally split Fisher data into train/validation/test sets
      train_2004, dev_2004, test_2004 = _split_sets(all_2004)
      train_2005, dev_2005, test_2005 = _split_sets(all_2005)
  
      # Join 2004 and 2005 data
      train_files = train_2004.append(train_2005)
      dev_files = dev_2004.append(dev_2005)
      test_files = test_2004.append(test_2005)
  
      # Write sets to disk as CSV files
      train_files.to_csv(
          os.path.join(data_dir, "fisher-train.csv"), index=False
      )
      dev_files.to_csv(
          os.path.join(data_dir, "fisher-dev.csv"), index=False
      )
      test_files.to_csv(
          os.path.join(data_dir, "fisher-test.csv"), index=False
      )
  
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 1 for calling a global function with example usage: _download_and_preprocess_data(data_dir) without return types