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 given audiofile into a sequence speech unit.
  
  Arguments
  ---------
  path : str
      Path to audio file which to translate.
  
  Returns
  -------
  int[]
      The audiofile translation produced by this speech-to-unit translationmodel.
docstr_tok: ["Translates","the","given","audiofile","into","a","sequence","speech","unit",".","Arguments","--","--","--","--","-","path",":","str","Path","to","audio","file","which","to","translate",".","Returns","--","--","--","-","int","[","]","The","audiofile","translation","produced","by","this","speech-to-unit","translationmodel","."]
code: def translate_file(self, path):
      """Translates the given audiofile into a sequence speech unit.
  
      Arguments
      ---------
      path : str
          Path to audio file which to translate.
  
      Returns
      -------
      int[]
          The audiofile translation produced by this speech-to-unit translationmodel.
      """
  
      audio = self.load_audio(path)
      audio = audio.to(self.device)
      # Fake a batch:
      batch = audio.unsqueeze(0)
      rel_length = torch.tensor([1.0])
      predicted_tokens = self.translate_batch(batch, rel_length)
      return predicted_tokens[0]
  
file_path: speechbrain/speechbrain/inference/ST.py
imports: import torch
  from speechbrain.inference.interfaces import Pretrained
label_desc: Use image node_id 2 for calling the EncoderDecoderS2UT obj's underlying member method code with example usage: obj.translate_file(path) and returns: predicted_tokens