class_docstr: ASR model wrapper to perform alignment building.
  Functionality is limited to the components needed to build an alignment.
docstr: Does alignment. Use this method for debugging and prototyping.
  
  Args:
  
      manifest: path to dataset JSON manifest file (in NeMo format).         Recommended length per audio file is between 5 and 25 seconds.
      batch_size: (int) batch size to use during inference.         Bigger will result in better throughput performance but would use more memory.
      num_workers: (int) number of workers for DataLoader
      verbose: (bool) whether to display tqdm progress bar
  
  Returns:
      A list of four: (label, start_frame, length, probability), called FrameCtmUnit,             in the same order as in the manifest.
docstr_tok: ["Does","alignment",".","Use","this","method","for","debugging","and","prototyping",".","Args",":","manifest",":","path","to","dataset","JSON","manifest","file","(","in","NeMo","format",")",".","Recommended","length","per","audio","file","is","between","5","and","25","seconds",".","batch_size",":","(","int",")","batch","size","to","use","during","inference",".","Bigger","will","result","in","better","throughput","performance","but","would","use","more","memory",".","num_workers",":","(","int",")","number","of","workers","for","DataLoader","verbose",":","(","bool",")","whether","to","display","tqdm","progress","bar","Returns",":","A","list","of","four",":","(","label",",","start_frame",",","length",",","probability",")",",","called","FrameCtmUnit",",","in","the","same","order","as","in","the","manifest","."]
code: def transcribe(
      self,
      manifest: List[str],
      batch_size: int = 4,
      num_workers: int = None,
      verbose: bool = True,
  ) -> List["FrameCtmUnit"]:
      """
          Does alignment. Use this method for debugging and prototyping.
  
          Args:
  
              manifest: path to dataset JSON manifest file (in NeMo format). \
          Recommended length per audio file is between 5 and 25 seconds.
              batch_size: (int) batch size to use during inference. \
          Bigger will result in better throughput performance but would use more memory.
              num_workers: (int) number of workers for DataLoader
              verbose: (bool) whether to display tqdm progress bar
  
          Returns:
              A list of four: (label, start_frame, length, probability), called FrameCtmUnit, \
              in the same order as in the manifest.
          """
      hypotheses = []
      # Model's mode and device
      mode = self._model.training
      device = next(self._model.parameters()).device
      dither_value = self._model.preprocessor.featurizer.dither
      pad_to_value = self._model.preprocessor.featurizer.pad_to
  
      if num_workers is None:
          num_workers = min(batch_size, os.cpu_count() - 1)
  
      try:
          self._model.preprocessor.featurizer.dither = 0.0
          self._model.preprocessor.featurizer.pad_to = 0
  
          # Switch model to evaluation mode
          self._model.eval()
          # Freeze the encoder and decoder modules
          self._model.encoder.freeze()
          self._model.decoder.freeze()
          if hasattr(self._model, "joint"):
              self._model.joint.freeze()
          logging_level = logging.get_verbosity()
          logging.set_verbosity(logging.WARNING)
  
          config = {
              "manifest_filepath": manifest,
              "batch_size": batch_size,
              "num_workers": num_workers,
          }
          temporary_datalayer = (
              self._model._setup_transcribe_dataloader(config)
          )
          for test_batch in tqdm(
              temporary_datalayer, desc="Aligning", disable=not verbose
          ):
              test_batch[0] = test_batch[0].to(device)
              test_batch[1] = test_batch[1].to(device)
              hypotheses += [
                  unit for i, unit in self.predict_step(test_batch, 0)
              ]
              del test_batch
      finally:
          # set mode back to its original value
          self._model.train(mode=mode)
          self._model.preprocessor.featurizer.dither = dither_value
          self._model.preprocessor.featurizer.pad_to = pad_to_value
  
          logging.set_verbosity(logging_level)
          if mode is True:
              self._model.encoder.unfreeze()
              self._model.decoder.unfreeze()
              if hasattr(self._model, "joint"):
                  self._model.joint.unfreeze()
      return hypotheses
  
imports: import copy
  import os
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  from tqdm.auto import tqdm
  from nemo.collections.asr.data.audio_to_ctm_dataset import FrameCtmUnit
  from nemo.collections.asr.data.audio_to_text_dali import DALIOutputs
  from nemo.collections.asr.models.asr_model import ASRModel
  from nemo.utils import logging
label_desc: Use image node_id 15 for calling the AlignerWrapperModel obj's underlying member method code with example usage: obj.transcribe(manifest, batch_size, num_workers, verbose) and returns: hypotheses