parameters: (list_file, outdir, categories_path, featurizer_path, window_size, shift,
                   noise_path=None, max_noise_ratio=0.1, noise_selection=0.1, multicore=False, use_cache=False)
docstring: Create a dataset given the input list file, a featurizer, the desired .wav sample rate,
      classifier window_size and window shift amount.  The dataset is saved to the same file name
      with .npz extension.  This will do nothing if dataset is already created, unless use_cache=False.
docstring_summary: Create a dataset given the input list file, a featurizer, the desired .wav sample rate,
      classifier window_size and window shift amount.  The dataset is saved to the same file name
      with .npz extension.  This will do nothing if dataset is already created, unless use_cache=False.
docstring_tokens: Create a dataset given the input list file a featurizer the desired . wav sample rate classifier window_size and window shift amount . The dataset is saved to the same file name with . npz extension . This will do nothing if dataset is already created unless use_cache = False .
function: def make_dataset(list_file, outdir, categories_path, featurizer_path, window_size, shift,
                   noise_path=None, max_noise_ratio=0.1, noise_selection=0.1, multicore=False, use_cache=False):
      """
      Create a dataset given the input list file, a featurizer, the desired .wav sample rate,
      classifier window_size and window shift amount.  The dataset is saved to the same file name
      with .npz extension.  This will do nothing if dataset is already created, unless use_cache=False.
      """
      dataset_name = os.path.basename(list_file)
      dataset_path = os.path.splitext(dataset_name)[0] + ".npz"
      if not outdir:
          dir_name = os.path.dirname(list_file)
          dataset_path = os.path.join(dir_name, dataset_path)
      else:
          dataset_path = os.path.join(outdir, dataset_path)
  
      if use_cache and os.path.isfile(dataset_path):
          return
      entry_map = parse_list_file(list_file)
      if not categories_path:
          dir_name = os.path.dirname(list_file)
          categories_path = os.path.join(dir_name, "categories.txt")
      if not os.path.isfile(categories_path):
          raise Exception("{} file not found".format(categories_path))
      categories = [x.strip() for x in open(categories_path, 'r').readlines()]
      print("Transforming {} with window size={} and shift={}".format(
          os.path.basename(list_file), window_size, shift))
  
      dataset = _get_dataset(entry_map, categories, featurizer_path, window_size, shift, noise_path, multicore,
                             max_noise_ratio, noise_selection)
      if len(dataset.features) == 0:
          print("No features found in list file")
  
      print("Saving: {}".format(dataset_path))
      dataset.save(dataset_path)
function_tokens: def make_dataset ( list_file , outdir , categories_path , featurizer_path , window_size , shift , noise_path = None , max_noise_ratio = 0.1 , noise_selection = 0.1 , multicore = False , use_cache = False ) : dataset_name = os . path . basename ( list_file ) dataset_path = os . path . splitext ( dataset_name ) [ 0 ] + ".npz" if not outdir : dir_name = os . path . dirname ( list_file ) dataset_path = os . path . join ( dir_name , dataset_path ) else : dataset_path = os . path . join ( outdir , dataset_path ) if use_cache and os . path . isfile ( dataset_path ) : return entry_map = parse_list_file ( list_file ) if not categories_path : dir_name = os . path . dirname ( list_file ) categories_path = os . path . join ( dir_name , "categories.txt" ) if not os . path . isfile ( categories_path ) : raise Exception ( "{} file not found" . format ( categories_path ) ) categories = [ x . strip ( ) for x in open ( categories_path , 'r' ) . readlines ( ) ] print ( "Transforming {} with window size={} and shift={}" . format ( os . path . basename ( list_file ) , window_size , shift ) ) dataset = _get_dataset ( entry_map , categories , featurizer_path , window_size , shift , noise_path , multicore , max_noise_ratio , noise_selection ) if len ( dataset . features ) == 0 : print ( "No features found in list file" ) print ( "Saving: {}" . format ( dataset_path ) ) dataset . save ( dataset_path )