code: def build_manifest(
      data_root, transcripts_path, manifest_path, wav_path
  ):
      with open(transcripts_path, "r") as fin:
          with open(manifest_path, "w") as fout:
              for line in fin:
                  # Lines look like this:
                  # <s> transcript </s> (fileID)
                  transcript = line[: line.find("(") - 1].lower()
                  transcript = transcript.replace("<s>", "").replace(
                      "</s>", ""
                  )
                  transcript = transcript.strip()
  
                  file_id = line[
                      line.find("(") + 1 : -2
                  ]  # e.g. "cen4-fash-b"
                  audio_path = os.path.join(
                      data_root,
                      wav_path,
                      file_id[
                          file_id.find("-") + 1 : file_id.rfind("-")
                      ],
                      file_id + ".wav",
                  )
  
                  duration = librosa.core.get_duration(
                      filename=audio_path
                  )
  
                  # Write the metadata to the manifest
                  metadata = {
                      "audio_filepath": audio_path,
                      "duration": duration,
                      "text": transcript,
                  }
                  json.dump(metadata, fout)
                  fout.write("\n")
  
file_path: NeMo/scripts/dataset_processing/process_an4_data.py
imports: import argparse
  import glob
  import json
  import logging
  import os
  import subprocess
  import librosa
label_desc: Use image node_id 1 for calling a global function with example usage: build_manifest(data_root, transcripts_path, manifest_path, wav_path) without return types