class_docstr: ASR model wrapper to perform alignment building.
  Functionality is limited to the components needed to build an alignment.
docstr: Part of __init__ intended to initialize attributes specific to the model type.
  
  This method is not supposed to be called outside of __init__.
docstr_tok: ["Part","of","__init__","intended","to","initialize","attributes","specific","to","the","model","type",".","This","method","is","not","supposed","to","be","called","outside","of","__init__","."]
code: def _init_model_specific(self, cfg: DictConfig):
      """Part of __init__ intended to initialize attributes specific to the model type.
  
      This method is not supposed to be called outside of __init__.
      """
      from nemo.collections.asr.models.ctc_models import EncDecCTCModel
  
      if isinstance(self._model, EncDecCTCModel):
          self.model_type = "ctc"
          self.blank_id = self._model.decoder.num_classes_with_blank - 1
          self._predict_impl = self._predict_impl_ctc
  
          prob_suppress_index = cfg.ctc_cfg.get(
              "prob_suppress_index", -1
          )
          prob_suppress_value = cfg.ctc_cfg.get(
              "prob_suppress_value", 1.0
          )
          if prob_suppress_value > 1 or prob_suppress_value <= 0:
              raise ValueError(
                  f"Suppression value has to be in (0,1]: {prob_suppress_value}"
              )
          if (
              prob_suppress_index < -(self.blank_id + 1)
              or prob_suppress_index > self.blank_id
          ):
              raise ValueError(
                  f"Suppression index for the provided model has to be in [{-self.blank_id+1},{self.blank_id}]: {prob_suppress_index}"
              )
          self.prob_suppress_index = (
              self._model.decoder.num_classes_with_blank
              + prob_suppress_index
              if prob_suppress_index < 0
              else prob_suppress_index
          )
          self.prob_suppress_value = prob_suppress_value
  
          self._init_ctc_alignment_specific(cfg)
          return
  
      from nemo.collections.asr.models.rnnt_models import (
          EncDecRNNTModel,
      )
  
      if isinstance(self._model, EncDecRNNTModel):
          self.model_type = "rnnt"
          self.blank_id = self._model.joint.num_classes_with_blank - 1
          self.log_softmax = (
              None
              if self._model.joint.log_softmax is None
              else not self._model.joint.log_softmax
          )
          self._predict_impl = self._predict_impl_rnnt
  
          decoding_config = copy.deepcopy(self._model.cfg.decoding)
          decoding_config.strategy = "greedy_batch"
          with open_dict(decoding_config):
              decoding_config.preserve_alignments = True
              decoding_config.fused_batch_size = -1
          self._model.change_decoding_strategy(decoding_config)
          self._init_rnnt_alignment_specific(cfg)
          return
  
      raise RuntimeError(f"Unsupported model type: {type(self._model)}")
  
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 4 for calling the AlignerWrapperModel obj's underlying member method code with example usage: obj._init_model_specific(cfg) without return types