class_docstr: A ready-to-use Whisper ASR model
  
  The class can be used  to  run the entire encoder-decoder whisper model
  (transcribe()) to transcribe speech. The given YAML must contains the fields
  specified in the *_NEEDED[] lists.
  
  Example
  -------
  >>> from speechbrain.inference.ASR import WhisperASR
  >>> tmpdir = getfixture("tmpdir")
  >>> asr_model = WhisperASR.from_hparams(source="speechbrain/asr-whisper-large-v2-commonvoice-fr", savedir=tmpdir,) # doctest: +SKIP
  >>> asr_model.transcribe_file("speechbrain/asr-whisper-large-v2-commonvoice-fr/example-fr.mp3") # doctest: +SKIP
class_docstr_tok: ["A","ready-to-use","Whisper","ASR","model","The","class","can","be","used","to","run","the","entire","encoder-decoder","whisper","model","(","transcribe","(",")",")","to","transcribe","speech",".","The","given","YAML","must","contains","the","fields","specified","in","the","*","_NEEDED","[","]","lists",".","Example","--","--","--","-",">",">",">","from","speechbrain.inference.ASR","import","WhisperASR",">",">",">","tmpdir","=","getfixture","(","``","tmpdir","''",")",">",">",">","asr_model","=","WhisperASR.from_hparams","(","source=","''","speechbrain\/asr-whisper-large-v2-commonvoice-fr","''",",","savedir=tmpdir",",",")","#","doctest",":","+SKIP",">",">",">","asr_model.transcribe_file","(","``","speechbrain\/asr-whisper-large-v2-commonvoice-fr\/example-fr.mp3","''",")","#","doctest",":","+SKIP"]
docstr: Transcribes the input audio into a sequence of words
  
  The waveforms should already be in the model's desired format.
  You can call:
  ``normalized = EncoderDecoderASR.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 transcribed.
  tensor
      Each predicted token id.
docstr_tok: ["Transcribes","the","input","audio","into","a","sequence","of","words","The","waveforms","should","already","be","in","the","model","'s","desired","format",".","You","can","call",":","``","normalized","=","EncoderDecoderASR.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","transcribed",".","tensor","Each","predicted","token","id","."]
code: def transcribe_batch(self, wavs, wav_lens):
      """Transcribes the input audio into a sequence of words
  
      The waveforms should already be in the model's desired format.
      You can call:
      ``normalized = EncoderDecoderASR.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 transcribed.
      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, scores = self.mods.decoder(
              encoder_out, wav_lens
          )
          predicted_words = self.tokenizer.batch_decode(
              predicted_tokens, skip_special_tokens=True
          )
          if self.hparams.normalized_transcripts:
              predicted_words = [
                  self.tokenizer._normalize(text).split(" ")
                  for text in predicted_words
              ]
  
      return predicted_words, predicted_tokens
  
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 4 for calling the WhisperASR obj's underlying member method code with example usage: obj.transcribe_batch(wavs, wav_lens) and returns: predicted_words,  predicted_tokens