class_docstr: An end-to-end SLU model.
  
  The class can be used either to run only the encoder (encode()) to extract
  features or to run the entire model (decode()) to map the speech to its semantics.
  
  Example
  -------
  >>> from speechbrain.inference.SLU import EndToEndSLU
  >>> tmpdir = getfixture("tmpdir")
  >>> slu_model = EndToEndSLU.from_hparams(
  ...     source="speechbrain/slu-timers-and-such-direct-librispeech-asr",
  ...     savedir=tmpdir,
  ... )  # doctest: +SKIP
  >>> slu_model.decode_file("tests/samples/single-mic/example6.wav") # doctest: +SKIP
  "{'intent': 'SimpleMath', 'slots': {'number1': 37.67, 'number2': 75.7, 'op': ' minus '}}"
code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      self.tokenizer = self.hparams.tokenizer
      self.asr_model = EncoderDecoderASR.from_hparams(
          source=self.hparams.asr_model_source,
          run_opts={"device": self.device},
      )
  
file_path: speechbrain/speechbrain/inference/SLU.py
imports: import torch
  from speechbrain.inference.interfaces import Pretrained
  from speechbrain.inference.ASR import EncoderDecoderASR
label_desc: Use image node_id 1 to create a new EndToEndSLU object from inherited base classes: Pretrained with example: obj = EndToEndSLU()