class_docstr: Transformer-based Speech-to-Text Decoder from OpenAI's Whisper Model:
  
  URL: https://github.com/openai/whisper
class_docstr_tok: ["Transformer-based","Speech-to-Text","Decoder","from","OpenAI","'s","Whisper","Model",":","URL",":","https",":","\/\/github.com\/openai\/whisper"]
docstr: Score new token batch.
  
  Args:
      ys (torch.Tensor): torch.int64 prefix tokens (n_batch, ylen).
      states (List[Any]): Scorer states for prefix tokens.
      xs (torch.Tensor):
          The encoder feature that generates ys (n_batch, xlen, n_feat).
  
  Returns:
      tuple[torch.Tensor, List[Any]]: Tuple of
          batchfied scores for next token with shape of `(n_batch, n_vocab)`
          and next state list for ys.
docstr_tok: ["Score","new","token","batch",".","Args",":","ys","(","torch.Tensor",")",":","torch.int64","prefix","tokens","(","n_batch",",","ylen",")",".","states","(","List","[","Any","]",")",":","Scorer","states","for","prefix","tokens",".","xs","(","torch.Tensor",")",":","The","encoder","feature","that","generates","ys","(","n_batch",",","xlen",",","n_feat",")",".","Returns",":","tuple","[","torch.Tensor",",","List","[","Any","]","]",":","Tuple","of","batchfied","scores","for","next","token","with","shape","of","`","(","n_batch",",","n_vocab",")","`","and","next","state","list","for","ys","."]
code: def batch_score(
      self, ys: torch.Tensor, states: List[Any], xs: torch.Tensor
  ) -> Tuple[torch.Tensor, List[Any]]:
      """Score new token batch.
  
      Args:
          ys (torch.Tensor): torch.int64 prefix tokens (n_batch, ylen).
          states (List[Any]): Scorer states for prefix tokens.
          xs (torch.Tensor):
              The encoder feature that generates ys (n_batch, xlen, n_feat).
  
      Returns:
          tuple[torch.Tensor, List[Any]]: Tuple of
              batchfied scores for next token with shape of `(n_batch, n_vocab)`
              and next state list for ys.
  
      """
      # batch decoding, dummy mask is passed
      logp, states = self.forward_one_step(
          ys, torch.empty(0), xs, cache=None
      )
  
      return logp, None
  
file_path: espnet/espnet2/asr/decoder/whisper_decoder.py
imports: import copy
  from typing import Any, List, Tuple
  import torch
  from typeguard import check_argument_types
  from espnet2.asr.decoder.abs_decoder import AbsDecoder
  from espnet.nets.scorer_interface import BatchScorerInterface
label_desc: Use image node_id 5 for calling the OpenAIWhisperDecoder obj's underlying member method code with example usage: obj.batch_score(ys, states, xs) and returns: logp,  None