class_docstr: A ready-to-use Encoder-Decoder ASR model
  
  The class can be used either to run only the encoder (encode()) to extract
  features or to run the entire encoder-decoder model
  (transcribe()) to transcribe speech. The given YAML must contain the fields
  specified in the *_NEEDED[] lists.
  
  Example
  -------
  >>> from speechbrain.inference.ASR import EncoderDecoderASR
  >>> tmpdir = getfixture("tmpdir")
  >>> asr_model = EncoderDecoderASR.from_hparams(
  ...     source="speechbrain/asr-crdnn-rnnlm-librispeech",
  ...     savedir=tmpdir,
  ... )  # doctest: +SKIP
  >>> asr_model.transcribe_file("tests/samples/single-mic/example2.flac")  # doctest: +SKIP
  "MY FATHER HAS REVEALED THE CULPRIT'S NAME"
class_docstr_tok: ["A","ready-to-use","Encoder-Decoder","ASR","model","The","class","can","be","used","either","to","run","only","the","encoder","(","encode","(",")",")","to","extract","features","or","to","run","the","entire","encoder-decoder","model","(","transcribe","(",")",")","to","transcribe","speech",".","The","given","YAML","must","contain","the","fields","specified","in","the","*","_NEEDED","[","]","lists",".","Example","--","--","--","-",">",">",">","from","speechbrain.inference.ASR","import","EncoderDecoderASR",">",">",">","tmpdir","=","getfixture","(","``","tmpdir","''",")",">",">",">","asr_model","=","EncoderDecoderASR.from_hparams","(","...","source=","''","speechbrain\/asr-crdnn-rnnlm-librispeech","''",",","...","savedir=tmpdir",",","...",")","#","doctest",":","+SKIP",">",">",">","asr_model.transcribe_file","(","``","tests\/samples\/single-mic\/example2.flac","''",")","#","doctest",":","+SKIP","''","MY","FATHER","HAS","REVEALED","THE","CULPRIT","'S","NAME","''"]
code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      self.tokenizer = self.hparams.tokenizer
      self.transducer_beam_search = False
      self.transformer_beam_search = False
      if hasattr(self.hparams, "transducer_beam_search"):
          self.transducer_beam_search = (
              self.hparams.transducer_beam_search
          )
      if hasattr(self.hparams, "transformer_beam_search"):
          self.transformer_beam_search = (
              self.hparams.transformer_beam_search
          )
  
imports: import torch
  import sentencepiece
  import speechbrain
  from speechbrain.inference.interfaces import Pretrained
  from speechbrain.utils.fetching import fetch
  from speechbrain.utils.data_utils import split_path
label_desc: Use image node_id 1 to create a new EncoderDecoderASR object from inherited base classes: Pretrained with example: obj = EncoderDecoderASR()