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: Initializes a new instance of the dataprepper class.
  
  This __init__ function requires a root datadir, and optionally takes
  pre-set train/dev/test lists as arguments for experiment replication.
  If the lists are not provided, new, randomized partitions are created.
  The Swiss French Polyphone corpus provides detailed speaker information,
  thus all splits take into account speaker ID information by default.
  
  Args:
      datadir (str): The output data directory location.
      trainlist (str): Optional fixed list of training utt IDs.
      devlist (str): Optional fixed list of dev utt IDs.
      testlist (str): Optional fixed list of test utt IDs.
docstr_tok: ["Initializes","a","new","instance","of","the","dataprepper","class",".","This","__init__","function","requires","a","root","datadir",",","and","optionally","takes","pre-set","train\/dev\/test","lists","as","arguments","for","experiment","replication",".","If","the","lists","are","not","provided",",","new",",","randomized","partitions","are","created",".","The","Swiss","French","Polyphone","corpus","provides","detailed","speaker","information",",","thus","all","splits","take","into","account","speaker","ID","information","by","default",".","Args",":","datadir","(","str",")",":","The","output","data","directory","location",".","trainlist","(","str",")",":","Optional","fixed","list","of","training","utt","IDs",".","devlist","(","str",")",":","Optional","fixed","list","of","dev","utt","IDs",".","testlist","(","str",")",":","Optional","fixed","list","of","test","utt","IDs","."]
code: def __init__(
      self, datadir, trainlist=None, devlist=None, testlist=None
  ):
      """Initializes a new instance of the dataprepper class.
  
      This __init__ function requires a root datadir, and optionally takes
      pre-set train/dev/test lists as arguments for experiment replication.
      If the lists are not provided, new, randomized partitions are created.
      The Swiss French Polyphone corpus provides detailed speaker information,
      thus all splits take into account speaker ID information by default.
  
      Args:
          datadir (str): The output data directory location.
          trainlist (str): Optional fixed list of training utt IDs.
          devlist (str): Optional fixed list of dev utt IDs.
          testlist (str): Optional fixed list of test utt IDs.
  
      """
      self.datadir = datadir
      self.valid = 0
      self.audiocorpus = {}
      self.references = {}
      self.all_chars = defaultdict(int)
      self.trainlist = trainlist
      self.devlist = devlist
      self.testlist = testlist
      self._loadlists()
  
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 1 to create a new FrPolyphonePrepper object  with example: obj = FrPolyphonePrepper(datadir, trainlist, devlist, testlist)