class_docstr: Beam search decoder for RNN-T model.
  
  See Also:
      * :class:`torchaudio.pipelines.RNNTBundle`: ASR pipeline with pretrained model.
  
  Args:
      model (RNNT): RNN-T model to use.
      blank (int): index of blank token in vocabulary.
      temperature (float, optional): temperature to apply to joint network output.
          Larger values yield more uniform samples. (Default: 1.0)
      hypo_sort_key (Callable[[Hypothesis], float] or None, optional): callable that computes a score
          for a given hypothesis to rank hypotheses by. If ``None``, defaults to callable that returns
          hypothesis score normalized by token sequence length. (Default: None)
      step_max_tokens (int, optional): maximum number of tokens to emit per input time step. (Default: 100)
class_docstr_tok: ["Beam","search","decoder","for","RNN-T","model",".","See","Also",":","*",":","class",":","`","torchaudio.pipelines.RNNTBundle","`",":","ASR","pipeline","with","pretrained","model",".","Args",":","model","(","RNNT",")",":","RNN-T","model","to","use",".","blank","(","int",")",":","index","of","blank","token","in","vocabulary",".","temperature","(","float",",","optional",")",":","temperature","to","apply","to","joint","network","output",".","Larger","values","yield","more","uniform","samples",".","(","Default",":","1.0",")","hypo_sort_key","(","Callable","[","[","Hypothesis","]",",","float","]","or","None",",","optional",")",":","callable","that","computes","a","score","for","a","given","hypothesis","to","rank","hypotheses","by",".","If","``","None","``",",","defaults","to","callable","that","returns","hypothesis","score","normalized","by","token","sequence","length",".","(","Default",":","None",")","step_max_tokens","(","int",",","optional",")",":","maximum","number","of","tokens","to","emit","per","input","time","step",".","(","Default",":","100",")"]
code: def _gen_a_hypos(
      self,
      a_hypos: List[Hypothesis],
      b_hypos: List[Hypothesis],
      next_token_probs: torch.Tensor,
      t: int,
      beam_width: int,
      device: torch.device,
  ) -> List[Hypothesis]:
      (
          nonblank_nbest_scores,
          nonblank_nbest_hypo_idx,
          nonblank_nbest_token,
      ) = _compute_updated_scores(a_hypos, next_token_probs, beam_width)
  
      if len(b_hypos) < beam_width:
          b_nbest_score = -float("inf")
      else:
          b_nbest_score = _get_hypo_score(b_hypos[-beam_width])
  
      base_hypos: List[Hypothesis] = []
      new_tokens: List[int] = []
      new_scores: List[float] = []
      for i in range(beam_width):
          score = float(nonblank_nbest_scores[i])
          if score > b_nbest_score:
              a_hypo_idx = int(nonblank_nbest_hypo_idx[i])
              base_hypos.append(a_hypos[a_hypo_idx])
              new_tokens.append(int(nonblank_nbest_token[i]))
              new_scores.append(score)
  
      if base_hypos:
          new_hypos = self._gen_new_hypos(
              base_hypos, new_tokens, new_scores, t, device
          )
      else:
          new_hypos: List[Hypothesis] = []
  
      return new_hypos
  
imports: from typing import Callable, Dict, List, Optional, Tuple
  import torch
  from torchaudio.models import RNNT
label_desc: Use image node_id 5 for calling the RNNTBeamSearch obj's underlying member method code with example usage: obj._gen_a_hypos(a_hypos, b_hypos, next_token_probs, t, beam_width, device) and returns: new_hypos