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 '}}"
docstr: Encodes the input audio into a sequence of hidden states
  
  Arguments
  ---------
  wavs : torch.Tensor
      Batch of waveforms [batch, time, channels] or [batch, time]
      depending on the model.
  wav_lens : torch.Tensor
      Lengths of the waveforms relative to the longest one in the
      batch, tensor of shape [batch]. The longest one should have
      relative length 1.0 and others len(waveform) / max_length.
      Used for ignoring padding.
  
  Returns
  -------
  torch.Tensor
      The encoded batch
code: def encode_batch(self, wavs, wav_lens):
      """Encodes the input audio into a sequence of hidden states
  
      Arguments
      ---------
      wavs : torch.Tensor
          Batch of waveforms [batch, time, channels] or [batch, time]
          depending on the model.
      wav_lens : torch.Tensor
          Lengths of the waveforms relative to the longest one in the
          batch, tensor of shape [batch]. The longest one should have
          relative length 1.0 and others len(waveform) / max_length.
          Used for ignoring padding.
  
      Returns
      -------
      torch.Tensor
          The encoded batch
      """
      wavs = wavs.float()
      wavs, wav_lens = wavs.to(self.device), wav_lens.to(self.device)
      ASR_encoder_out = self.asr_model.encode_batch(
          wavs.detach(), wav_lens
      )
      encoder_out = self.mods.slu_enc(ASR_encoder_out)
      return encoder_out
  
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 3 for calling the EndToEndSLU obj's underlying member method code with example usage: obj.encode_batch(wavs, wav_lens) and returns: encoder_out