code: def process_files(csv_file, data_root, num_workers):
      """Read *.csv file description, convert mp3 to wav, process text.
          Save results to data_root.
  
      Args:
          csv_file: str, path to *.csv file with data description, usually start from 'cv-'
          data_root: str, path to dir to save results; wav/ dir will be created
      """
      wav_dir = os.path.join(data_root, "wav/")
      os.makedirs(wav_dir, exist_ok=True)
      audio_clips_path = os.path.dirname(csv_file) + "/clips/"
  
      def process(x):
          file_path, text = x
          file_name = os.path.splitext(os.path.basename(file_path))[0]
          text = text.lower().strip()
          audio_path = os.path.join(audio_clips_path, file_path)
          if os.path.getsize(audio_path) == 0:
              logging.warning(f"Skipping empty audio file {audio_path}")
              return "", "", ""
  
          output_wav_path = os.path.join(wav_dir, file_name + ".wav")
  
          if not os.path.exists(output_wav_path):
              tfm = Transformer()
              tfm.rate(samplerate=args.sample_rate)
              tfm.channels(n_channels=args.n_channels)
              tfm.build(
                  input_filepath=audio_path,
                  output_filepath=output_wav_path,
              )
  
          duration = sox.file_info.duration(output_wav_path)
          return output_wav_path, duration, text
  
      logging.info("Converting mp3 to wav for {}.".format(csv_file))
      with open(csv_file) as csvfile:
          reader = csv.DictReader(csvfile, delimiter="\t")
          next(reader, None)  # skip the headers
          data = []
          for row in reader:
              file_name = row["path"]
              # add the mp3 extension if the tsv entry does not have it
              if not file_name.endswith(".mp3"):
                  file_name += ".mp3"
              data.append((file_name, row["sentence"]))
          with ThreadPool(num_workers) as pool:
              data = list(
                  tqdm(pool.imap(process, data), total=len(data))
              )
      return data
  
file_path: NeMo/scripts/dataset_processing/get_commonvoice_data.py
imports: import argparse
  import csv
  import json
  import logging
  import multiprocessing
  import os
  import subprocess
  import sys
  import tarfile
  from multiprocessing.pool import ThreadPool
  from pathlib import Path
  from typing import List
  import sox
  from sox import Transformer
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: process_files(csv_file, data_root, num_workers) and returns: data, output_wav_path,  duration,  text, str,  str,  str