code: def prepare_inference_manifest(cfg: DictConfig) -> str:
      if cfg.audio_dir is not None and cfg.manifest_filepath is None:
          manifest_data = []
          for audio_file in Path(cfg.audio_dir).glob(
              f"**/*.{cfg.audio_type}"
          ):
              item = {
                  "audio_filepath": str(audio_file.absolute()),
                  "duration": 1000000,
                  "offset": 0,
              }
              manifest_data.append(item)
          parent_dir = Path(cfg.audio_dir)
      else:
          manifest_data = read_manifest(cfg.manifest_filepath)
          parent_dir = Path(cfg.manifest_filepath).parent
  
      new_manifest_data = []
  
      for item in manifest_data:
          audio_file = Path(item["audio_filepath"])
          if (
              len(str(audio_file)) < 255
              and not audio_file.is_file()
              and not audio_file.is_absolute()
          ):
              new_audio_file = parent_dir / audio_file
              if new_audio_file.is_file():
                  item["audio_filepath"] = str(
                      new_audio_file.absolute()
                  )
              else:
                  item["audio_filepath"] = os.path.expanduser(
                      str(audio_file)
                  )
          else:
              item["audio_filepath"] = os.path.expanduser(
                  str(audio_file)
              )
          item["label"] = "infer"
          item["text"] = "-"
          new_manifest_data.append(item)
  
      new_manifest_filepath = str(
          Path(cfg.output_dir) / Path("temp_manifest_input.json")
      )
      write_manifest(new_manifest_filepath, new_manifest_data)
      return new_manifest_filepath
  
imports: import contextlib
  import json
  import os
  import time
  from dataclasses import dataclass, is_dataclass
  from pathlib import Path
  from typing import Callable, Optional
  import torch
  import yaml
  from omegaconf import DictConfig, OmegaConf
  from torch.profiler import ProfilerActivity, profile, record_function
  from tqdm import tqdm
  from nemo.collections.asr.data import feature_to_text_dataset
  from nemo.collections.asr.metrics.wer import word_error_rate
  from nemo.collections.asr.models import ASRModel, EncDecClassificationModel
  from nemo.collections.asr.parts.submodules import CTCDecodingConfig
  from nemo.collections.asr.parts.submodules.rnnt_decoding import RNNTDecodingConfig
  from nemo.collections.asr.parts.utils.manifest_utils import read_manifest, write_manifest
  from nemo.collections.asr.parts.utils.vad_utils import generate_overlap_vad_seq, generate_vad_segment_table, get_vad_stream_status, init_frame_vad_model, init_vad_model
  from nemo.core.config import hydra_runner
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_inference_manifest(cfg) and returns: new_manifest_filepath