code: def prepare_common_language(
      data_folder, save_folder, skip_prep=False
  ):
      """
      Prepares the csv files for the CommonLanguage dataset for LID.
      Download: https://www.dropbox.com/s/qqpmqay3q9xb1vf/common_voice_kpd.tar.gz?dl=0
  
      Arguments
      ---------
      data_folder : str
          Path to the folder where the CommonLanguage dataset for LID is stored.
          This path should include the multi: /datasets/CommonLanguage
      save_folder : str
          The directory where to store the csv files.
      max_duration : int, optional
          Max duration (in seconds) of training uterances.
      skip_prep: bool
          If True, skip data preparation.
  
      Example
      -------
      >>> from recipes.CommonLanguage.common_language_prepare import prepare_common_language
      >>> data_folder = '/datasets/CommonLanguage'
      >>> save_folder = 'exp/CommonLanguage_exp'
      >>> prepare_common_language(\
              data_folder,\
              save_folder,\
              skip_prep=False\
          )
      """
  
      if skip_prep:
          return
  
      # Setting the save folder
      os.makedirs(save_folder, exist_ok=True)
  
      # Setting ouput files
      save_csv_train = os.path.join(save_folder, "train.csv")
      save_csv_dev = os.path.join(save_folder, "dev.csv")
      save_csv_test = os.path.join(save_folder, "test.csv")
  
      # If csv already exists, we skip the data preparation
      if skip(save_csv_train, save_csv_dev, save_csv_test):
          csv_exists = " already exists, skipping data preparation!"
          msg = save_csv_train + csv_exists
          logger.info(msg)
          msg = save_csv_dev + csv_exists
          logger.info(msg)
          msg = save_csv_test + csv_exists
          logger.info(msg)
  
          return
  
      # Additional checks to make sure the data folder contains Common Language
      check_common_language_folder(data_folder)
  
      # Audio files extensions
      extension = [".wav"]
  
      # Create the signal list of train, dev, and test sets.
      data_split = create_sets(data_folder, extension)
  
      # Creating csv files for training, dev and test data
      create_csv(wav_list=data_split["train"], csv_file=save_csv_train)
      create_csv(wav_list=data_split["dev"], csv_file=save_csv_dev)
      create_csv(wav_list=data_split["test"], csv_file=save_csv_test)
  
file_path: speechbrain/recipes/CommonLanguage/common_language_prepare.py
imports: import os
  import csv
  import logging
  import torchaudio
  from tqdm.contrib import tzip
  from speechbrain.utils.data_utils import get_all_files
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_common_language(data_folder, save_folder, skip_prep) without return types