class_docstr: A ready-to-use Encoder Decoder for speech-to-unit translation model
  
  The class can be used  to  run the entire encoder-decoder S2UT model
  (translate_file()) to translate speech. The given YAML must contains the fields
  specified in the *_NEEDED[] lists.
  
  Example
  -------
  >>> from speechbrain.inference.ST import EncoderDecoderS2UT
  >>> tmpdir = getfixture("tmpdir")
  >>> s2ut_model = EncoderDecoderS2UT.from_hparams(source="speechbrain/s2st-transformer-fr-en-hubert-l6-k100-cvss", savedir=tmpdir) # doctest: +SKIP
  >>> s2ut_model.translate_file("speechbrain/s2st-transformer-fr-en-hubert-l6-k100-cvss/example-fr.wav") # doctest: +SKIP
docstr: Translates the input audio into a sequence of words
  
  The waveforms should already be in the model's desired format.
  You can call:
  ``normalized = EncoderDecoderS2UT.normalizer(signal, sample_rate)``
  to get a correctly converted signal in most cases.
  
  Arguments
  ---------
  wavs : torch.tensor
      Batch of waveforms [batch, time, channels].
  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
  -------
  list
      Each waveform in the batch translated.
  tensor
      Each predicted token id.
docstr_tok: ["Translates","the","input","audio","into","a","sequence","of","words","The","waveforms","should","already","be","in","the","model","'s","desired","format",".","You","can","call",":","``","normalized","=","EncoderDecoderS2UT.normalizer","(","signal",",","sample_rate",")","``","to","get","a","correctly","converted","signal","in","most","cases",".","Arguments","--","--","--","--","-","wavs",":","torch.tensor","Batch","of","waveforms","[","batch",",","time",",","channels","]",".","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","--","--","--","-","list","Each","waveform","in","the","batch","translated",".","tensor","Each","predicted","token","id","."]
code: def translate_batch(self, wavs, wav_lens):
      """Translates the input audio into a sequence of words
  
      The waveforms should already be in the model's desired format.
      You can call:
      ``normalized = EncoderDecoderS2UT.normalizer(signal, sample_rate)``
      to get a correctly converted signal in most cases.
  
      Arguments
      ---------
      wavs : torch.tensor
          Batch of waveforms [batch, time, channels].
      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
      -------
      list
          Each waveform in the batch translated.
      tensor
          Each predicted token id.
      """
      with torch.no_grad():
          wav_lens = wav_lens.to(self.device)
          encoder_out = self.encode_batch(wavs, wav_lens)
          predicted_tokens, _ = self.mods.decoder(encoder_out, wav_lens)
      return predicted_tokens
  
file_path: speechbrain/speechbrain/inference/ST.py
imports: import torch
  from speechbrain.inference.interfaces import Pretrained
label_desc: Use image node_id 4 for calling the EncoderDecoderS2UT obj's underlying member method code with example usage: obj.translate_batch(wavs, wav_lens) and returns: predicted_tokens