class_docstr: Base class for encoder decoder CTC-based models.
class_docstr_tok: ["Base","class","for","encoder","decoder","CTC-based","models","."]
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).
          """
      batch_size = min(
          config["batch_size"], len(config["paths2audio_files"])
      )
      dl_config = {
          "manifest_filepath": os.path.join(
              config["temp_dir"], "manifest.json"
          ),
          "sample_rate": self.preprocessor._sample_rate,
          "batch_size": batch_size,
          "trim_silence": False,
          "shuffle": False,
          "num_workers": min(batch_size, os.cpu_count() - 1),
          "pin_memory": True,
      }
  
      temporary_datalayer = self._setup_dataloader_from_config(
          config=DictConfig(dl_config)
      )
      return temporary_datalayer
  
imports: import itertools
  import json
  import os
  import tempfile
  from math import ceil
  from typing import Dict, List, Optional, Union
  import editdistance
  import torch
  import torch.distributed
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from tqdm.auto import tqdm
  from nemo.collections.asr.data import audio_to_text_dataset
  from nemo.collections.asr.data.audio_to_text_dali import DALIOutputs
  from nemo.collections.asr.data.audio_to_text_lhotse import LhotseSpeechToTextBpeDataset
  from nemo.collections.asr.models.asr_model import ASRModel, ExportableEncDecModel
  from nemo.collections.asr.parts.mixins import ASRBPEMixin
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.common.data.lhotse import get_lhotse_dataloader_from_config
  from nemo.collections.common.losses import SmoothedCrossEntropyLoss
  from nemo.collections.common.metrics import GlobalAverageLossMetric
  from nemo.collections.common.parts import transformer_weights_init
  from nemo.core.classes.common import typecheck
  from nemo.core.neural_types import AudioSignal, ChannelType, LabelsType, LengthsType, LogprobsType, MaskType, NeuralType, SpectrogramType
  from nemo.utils import logging
label_desc: Use image node_id 17 for calling the EncDecTransfModelBPE obj's underlying member method code with example usage: obj._setup_transcribe_dataloader(config) and returns: temporary_datalayer