class_docstr: Data preparation script for the Swiss French Polyphone corpus.
  
  This class provides the scripting backbone for preparing the
  Swiss French Polyphone corpus for ASR training with espnet.  This
  script was written in reference to the following version of the
  corpus as listed on ELRA:
  
  This class/script, together with the corresponding configuration
  file `conf/dataprep.yaml` perform all required data prep.
  
  .. _ELRA-S0030_02:
      http://catalog.elra.info/en-us/repository/browse/ELRA-S0030_02
class_docstr_tok: ["Data","preparation","script","for","the","Swiss","French","Polyphone","corpus",".","This","class","provides","the","scripting","backbone","for","preparing","the","Swiss","French","Polyphone","corpus","for","ASR","training","with","espnet",".","This","script","was","written","in","reference","to","the","following","version","of","the","corpus","as","listed","on","ELRA",":","This","class\/script",",","together","with","the","corresponding","configuration","file","`","conf\/dataprep.yaml","`","perform","all","required","data","prep",".","..","_ELRA-S0030_02",":","http",":","\/\/catalog.elra.info\/en-us\/repository\/browse\/ELRA-S0030_02"]
docstr: Recursively search the target dir for reference files.
  
  Recursively search the root target directory for reference files,
  then process each valid file in turn.  There is some inconsistency
  in the DOS/UNIX sets, though they largely overlap.  We process
  everything but only retain the global unique set[no dupes].
  
  Args:
      path(str): The root path to start the recursion from.
docstr_tok: ["Recursively","search","the","target","dir","for","reference","files",".","Recursively","search","the","root","target","directory","for","reference","files",",","then","process","each","valid","file","in","turn",".","There","is","some","inconsistency","in","the","DOS\/UNIX","sets",",","though","they","largely","overlap",".","We","process","everything","but","only","retain","the","global","unique","set","[","no","dupes","]",".","Args",":","path","(","str",")",":","The","root","path","to","start","the","recursion","from","."]
code: def findfiles(self, path):
      """Recursively search the target dir for reference files.
  
      Recursively search the root target directory for reference files,
      then process each valid file in turn.  There is some inconsistency
      in the DOS/UNIX sets, though they largely overlap.  We process
      everything but only retain the global unique set[no dupes].
  
      Args:
          path(str): The root path to start the recursion from.
  
      """
      for fname in os.listdir(path):
          fpath = os.path.join(path, fname)
          if os.path.isfile(fpath):
              # .ALW are audio files
              if fpath.endswith(".ALW"):
                  fid = os.path.split(fpath)[-1]
                  fid = re.sub(r"\.ALW$", "", fid)
                  fpath = re.sub(r"^\./", "", fpath)
                  self.audiocorpus[fid] = fpath
              # .LST files contain transcriptions
              elif fpath.endswith(".LST"):
                  if "/DOS/" in fpath:
                      self.processreference(fpath)
                  elif "/UNIX/" in fpath:
                      self.processreference(fpath)
                  else:
                      pass
          else:
              self.findfiles(fpath)
  
imports: import os
  import pathlib
  import re
  import subprocess
  import sys
  from collections import defaultdict
  from random import shuffle
label_desc: Use image node_id 10 for calling the FrPolyphonePrepper obj's underlying member method code with example usage: obj.findfiles(path) without return types