code: def create_manifest(
      wav_path: str,
      manifest_filepath: str,
      text_path: str = None,
      rttm_path: str = None,
      uem_path: str = None,
      ctm_path: str = None,
      add_duration: bool = False,
  ):
      """
      Create base manifest file
  
      Args:
          wav_path (str): Path to list of wav files
          manifest_filepath (str): Path to output manifest file
          text_path (str): Path to list of text files
          rttm_path (str): Path to list of rttm files
          uem_path (str): Path to list of uem files
          ctm_path (str): Path to list of ctm files
          add_duration (bool): Whether to add durations to the manifest file
      """
      if os.path.exists(manifest_filepath):
          os.remove(manifest_filepath)
      wav_pathlist = read_file(wav_path)
      wav_pathdict = get_dict_from_wavlist(wav_pathlist)
      len_wavs = len(wav_pathlist)
      uniqids = sorted(wav_pathdict.keys())
  
      text_pathdict = get_path_dict(text_path, uniqids, len_wavs)
      rttm_pathdict = get_path_dict(rttm_path, uniqids, len_wavs)
      uem_pathdict = get_path_dict(uem_path, uniqids, len_wavs)
      ctm_pathdict = get_path_dict(ctm_path, uniqids, len_wavs)
  
      lines = []
      for uid in uniqids:
          wav, text, rttm, uem, ctm = (
              wav_pathdict[uid],
              text_pathdict[uid],
              rttm_pathdict[uid],
              uem_pathdict[uid],
              ctm_pathdict[uid],
          )
  
          audio_line = wav.strip()
          if rttm is not None:
              rttm = rttm.strip()
              labels = rttm_to_labels(rttm)
              num_speakers = (
                  Counter([l.split()[-1] for l in labels])
                  .keys()
                  .__len__()
              )
          else:
              num_speakers = None
  
          if uem is not None:
              uem = uem.strip()
  
          if text is not None:
              with open(text.strip()) as f:
                  text = f.readlines()[0].strip()
          else:
              text = "-"
  
          if ctm is not None:
              ctm = ctm.strip()
  
          duration = None
          if add_duration:
              y, sr = librosa.load(audio_line, sr=None)
              duration = librosa.get_duration(y=y, sr=sr)
          meta = [
              {
                  "audio_filepath": audio_line,
                  "offset": 0,
                  "duration": duration,
                  "label": "infer",
                  "text": text,
                  "num_speakers": num_speakers,
                  "rttm_filepath": rttm,
                  "uem_filepath": uem,
                  "ctm_filepath": ctm,
              }
          ]
          lines.extend(meta)
  
      write_file(manifest_filepath, lines, range(len(lines)))
  
imports: import json
  import os
  from collections import Counter
  from collections import OrderedDict
  from pathlib import Path
  from typing import Dict, List, Union
  import librosa
  import numpy
  from nemo.collections.asr.parts.utils.speaker_utils import audio_rttm_map, get_subsegments, get_uniqname_from_filepath, rttm_to_labels, segments_manifest_to_subsegments_manifest, write_rttm2manifest
  from nemo.utils.data_utils import DataStoreObject
label_desc: Use image node_id 14 for calling a global function with example usage: create_manifest(wav_path, manifest_filepath, text_path, rttm_path, uem_path, ctm_path, add_duration) without return types