class_docstr: Speech-to-text alignment model (https://arxiv.org/pdf/2108.10447.pdf) that is used to learn alignments between mel spectrogram and text.
class_docstr_tok: ["Speech-to-text","alignment","model","(","https",":","\/\/arxiv.org\/pdf\/2108.10447.pdf",")","that","is","used","to","learn","alignments","between","mel","spectrogram","and","text","."]
code: def _loader(self, cfg):
      try:
          _ = cfg.dataset.manifest_filepath
      except omegaconf.errors.MissingMandatoryValue:
          logging.warning(
              "manifest_filepath was skipped. No dataset for this model."
          )
          return None
  
      dataset = instantiate(
          cfg.dataset,
          text_normalizer=self.normalizer,
          text_normalizer_call_kwargs=self.text_normalizer_call_kwargs,
          text_tokenizer=self.tokenizer,
      )
      return torch.utils.data.DataLoader(  # noqa
          dataset=dataset,
          collate_fn=dataset.collate_fn,
          **cfg.dataloader_params,
      )
  
imports: from typing import List
  import numpy
  import omegaconf
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from pytorch_lightning.loggers import WandbLogger
  from torch import nn
  from nemo.collections.tts.losses.aligner_loss import BinLoss, ForwardSumLoss
  from nemo.collections.tts.parts.utils.helpers import binarize_attention, g2p_backward_compatible_support, get_mask_from_lengths, plot_alignment_to_numpy
  from nemo.core.classes import ModelPT
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 9 for calling the AlignerModel obj's underlying member method code with example usage: obj._loader(cfg) and returns: torch, None