class_docstr: Speech Representation Using Encoder Outputs from OpenAI's Whisper Model:
  
  URL: https://github.com/openai/whisper
class_docstr_tok: ["Speech","Representation","Using","Encoder","Outputs","from","OpenAI","'s","Whisper","Model",":","URL",":","https",":","\/\/github.com\/openai\/whisper"]
code: def forward(
      self, input: torch.Tensor, input_lengths: torch.Tensor
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      feats, feats_lens = self.log_mel_spectrogram(input, input_lengths)
  
      with torch.no_grad() if self.freeze_weights else contextlib.nullcontext():
          feats, feats_lens = self.whisper_encode(feats, feats_lens)
  
      return feats, feats_lens
  
file_path: espnet/espnet2/asr/frontend/whisper.py
imports: import contextlib
  from typing import Tuple
  import torch
  import torch.nn.functional
  from typeguard import check_argument_types
  from espnet2.asr.frontend.abs_frontend import AbsFrontend
label_desc: Use image node_id 5 for calling the WhisperFrontend obj's underlying member method code with example usage: obj.forward(input, input_lengths) and returns: feats,  feats_lens