class_docstr: Base class for encoder decoder RNNT-based models with subword tokenization.
class_docstr_tok: ["Base","class","for","encoder","decoder","RNNT-based","models","with","subword","tokenization","."]
docstr: Setup function for a temporary data loader which wraps the provided audio file.
  
  Args:
      config: A python dictionary which contains the following keys:
      paths2audio_files: (a list) of paths to audio files. The files should be relatively short fragments.                 Recommended length per 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.
      temp_dir: (str) A temporary directory where the audio manifest is temporarily
          stored.
  
  Returns:
      A pytorch DataLoader for the given audio file(s).
docstr_tok: ["Setup","function","for","a","temporary","data","loader","which","wraps","the","provided","audio","file",".","Args",":","config",":","A","python","dictionary","which","contains","the","following","keys",":","paths2audio_files",":","(","a","list",")","of","paths","to","audio","files",".","The","files","should","be","relatively","short","fragments",".","Recommended","length","per","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",".","temp_dir",":","(","str",")","A","temporary","directory","where","the","audio","manifest","is","temporarily","stored",".","Returns",":","A","pytorch","DataLoader","for","the","given","audio","file","(","s",")","."]
code: def _setup_transcribe_dataloader(
      self, config: Dict
  ) -> "torch.utils.data.DataLoader":
      """
          Setup function for a temporary data loader which wraps the provided audio file.
  
          Args:
              config: A python dictionary which contains the following keys:
              paths2audio_files: (a list) of paths to audio files. The files should be relatively short fragments. \
                  Recommended length per 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.
              temp_dir: (str) A temporary directory where the audio manifest is temporarily
                  stored.
  
          Returns:
              A pytorch DataLoader for the given audio file(s).
          """
      if "manifest_filepath" in config:
          manifest_filepath = config["manifest_filepath"]
          batch_size = config["batch_size"]
      else:
          manifest_filepath = os.path.join(
              config["temp_dir"], "manifest.json"
          )
          batch_size = min(
              config["batch_size"], len(config["paths2audio_files"])
          )
  
      dl_config = {
          "manifest_filepath": manifest_filepath,
          "sample_rate": self.preprocessor._sample_rate,
          "batch_size": batch_size,
          "shuffle": False,
          "num_workers": config.get(
              "num_workers", min(batch_size, os.cpu_count() - 1)
          ),
          "pin_memory": True,
          "channel_selector": config.get("channel_selector", None),
          "use_start_end_token": self.cfg.validation_ds.get(
              "use_start_end_token", False
          ),
      }
  
      if config.get("augmentor"):
          dl_config["augmentor"] = config.get("augmentor")
  
      temporary_datalayer = self._setup_dataloader_from_config(
          config=DictConfig(dl_config)
      )
      return temporary_datalayer
  
imports: import copy
  import os
  from typing import Dict, List, Optional, Union
  import torch
  from omegaconf import DictConfig, ListConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from nemo.collections.asr.data import audio_to_text_dataset
  from nemo.collections.asr.data.audio_to_text_dali import AudioToBPEDALIDataset
  from nemo.collections.asr.data.audio_to_text_lhotse import LhotseSpeechToTextBpeDataset
  from nemo.collections.asr.losses.rnnt import RNNTLoss
  from nemo.collections.asr.metrics.wer import WER
  from nemo.collections.asr.models.rnnt_models import EncDecRNNTModel
  from nemo.collections.asr.parts.mixins import ASRBPEMixin
  from nemo.collections.asr.parts.submodules.rnnt_decoding import RNNTBPEDecoding, RNNTBPEDecodingConfig
  from nemo.collections.common.data.lhotse import get_lhotse_dataloader_from_config
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 6 for calling the EncDecRNNTBPEModel obj's underlying member method code with example usage: obj._setup_transcribe_dataloader(config) and returns: temporary_datalayer