class_docstr: Model for end-to-end speech intent classification and slot filling, which is formulated as a speech-to-sequence task
class_docstr_tok: ["Model","for","end-to-end","speech","intent","classification","and","slot","filling",",","which","is","formulated","as","a","speech-to-sequence","task"]
docstr: Uses greedy decoding to transcribe audio files into SLU semantics. 
  Use this method for debugging and prototyping.
  
  Args:
      paths2audio_files: (a list) of paths to audio files.                 Recommended length per file is between 5 and 25 seconds.                 But it is possible to pass a few hours long file if enough GPU memory is available.
      batch_size: (int) batch size to use during inference.
          Bigger will result in better throughput performance but would use more memory.
      logprobs: (bool) pass True to get log probabilities instead of transcripts.
      return_hypotheses: (bool) Either return hypotheses or text
          With hypotheses can do some postprocessing like getting timestamp or rescoring
      num_workers: (int) number of workers for DataLoader
      verbose: (bool) whether to display tqdm progress bar
  
  Returns:
      A list of transcriptions (or raw log probabilities if logprobs is True) in the same order as paths2audio_files
docstr_tok: ["Uses","greedy","decoding","to","transcribe","audio","files","into","SLU","semantics",".","Use","this","method","for","debugging","and","prototyping",".","Args",":","paths2audio_files",":","(","a","list",")","of","paths","to","audio","files",".","Recommended","length","per","file","is","between","5","and","25","seconds",".","But","it","is","possible","to","pass","a","few","hours","long","file","if","enough","GPU","memory","is","available",".","batch_size",":","(","int",")","batch","size","to","use","during","inference",".","Bigger","will","result","in","better","throughput","performance","but","would","use","more","memory",".","logprobs",":","(","bool",")","pass","True","to","get","log","probabilities","instead","of","transcripts",".","return_hypotheses",":","(","bool",")","Either","return","hypotheses","or","text","With","hypotheses","can","do","some","postprocessing","like","getting","timestamp","or","rescoring","num_workers",":","(","int",")","number","of","workers","for","DataLoader","verbose",":","(","bool",")","whether","to","display","tqdm","progress","bar","Returns",":","A","list","of","transcriptions","(","or","raw","log","probabilities","if","logprobs","is","True",")","in","the","same","order","as","paths2audio_files"]
code: def transcribe(
      self,
      paths2audio_files: List[str],
      batch_size: int = 4,
      logprobs: bool = False,
      return_hypotheses: bool = False,
      num_workers: int = 0,
      verbose: bool = True,
  ) -> List[str]:
      """
          Uses greedy decoding to transcribe audio files into SLU semantics. 
          Use this method for debugging and prototyping.
  
          Args:
              paths2audio_files: (a list) of paths to audio files. \
                  Recommended length per file is between 5 and 25 seconds. \
                  But it is possible to pass a few hours long file if enough GPU memory is available.
              batch_size: (int) batch size to use during inference.
                  Bigger will result in better throughput performance but would use more memory.
              logprobs: (bool) pass True to get log probabilities instead of transcripts.
              return_hypotheses: (bool) Either return hypotheses or text
                  With hypotheses can do some postprocessing like getting timestamp or rescoring
              num_workers: (int) number of workers for DataLoader
              verbose: (bool) whether to display tqdm progress bar
  
          Returns:
              A list of transcriptions (or raw log probabilities if logprobs is True) in the same order as paths2audio_files
          """
      if paths2audio_files is None or len(paths2audio_files) == 0:
          return {}
  
      if return_hypotheses and logprobs:
          raise ValueError(
              "Either `return_hypotheses` or `logprobs` can be True at any given time."
              "Returned hypotheses will contain the logprobs."
          )
  
      if num_workers is None:
          num_workers = min(batch_size, os.cpu_count() - 1)
  
      # We will store transcriptions here
      hypotheses = []
  
      # Model's mode and device
      mode = self.training
      device = next(self.parameters()).device
      dither_value = self.preprocessor.featurizer.dither
      pad_to_value = self.preprocessor.featurizer.pad_to
  
      try:
          self.preprocessor.featurizer.dither = 0.0
          self.preprocessor.featurizer.pad_to = 0
          # Switch model to evaluation mode
          self.eval()
  
          logging_level = logging.get_verbosity()
          logging.set_verbosity(logging.WARNING)
          # Work in tmp directory - will store manifest file there
          with tempfile.TemporaryDirectory() as tmpdir:
              with open(
                  os.path.join(tmpdir, "manifest.json"),
                  "w",
                  encoding="utf-8",
              ) as fp:
                  for audio_file in paths2audio_files:
                      entry = {
                          "audio_filepath": audio_file,
                          "duration": 100000,
                          "text": "",
                      }
                      fp.write(json.dumps(entry) + "\n")
  
              config = {
                  "paths2audio_files": paths2audio_files,
                  "batch_size": batch_size,
                  "temp_dir": tmpdir,
                  "num_workers": num_workers,
              }
  
              temporary_datalayer = self._setup_transcribe_dataloader(
                  config
              )
              for test_batch in tqdm(
                  temporary_datalayer,
                  desc="Transcribing",
                  disable=not verbose,
              ):
                  predictions = self.predict(
                      input_signal=test_batch[0].to(device),
                      input_signal_length=test_batch[1].to(device),
                  )
  
                  hypotheses += predictions
  
                  del predictions
                  del test_batch
      finally:
          # set mode back to its original value
          self.train(mode=mode)
          self.preprocessor.featurizer.dither = dither_value
          self.preprocessor.featurizer.pad_to = pad_to_value
          logging.set_verbosity(logging_level)
  
      return hypotheses
  
imports: import json
  import os
  import tempfile
  from math import ceil
  from typing import Dict, List, Optional, Union
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  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.metrics.wer import WER
  from nemo.collections.asr.models.asr_model import ASRModel, ExportableEncDecModel
  from nemo.collections.asr.parts.mixins import ASRBPEMixin, ASRModuleMixin
  from nemo.collections.asr.parts.preprocessing.perturb import process_augmentations
  from nemo.collections.asr.parts.submodules.ctc_decoding import CTCBPEDecoding, CTCBPEDecodingConfig
  from nemo.collections.asr.parts.utils.slu_utils import SequenceGenerator, SequenceGeneratorConfig, get_seq_mask
  from nemo.collections.common.losses import SmoothedNLLLoss
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types import AudioSignal, LabelsType, LengthsType, LogprobsType, NeuralType, SpectrogramType
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 17 for calling the SLUIntentSlotBPEModel obj's underlying member method code with example usage: obj.transcribe(paths2audio_files, batch_size, logprobs, return_hypotheses, num_workers, verbose) and returns: hypotheses, dict