class_docstr: A class for streaming frame-based ASR.
  Inherits from FrameBatchASR and adds new capability of returning the logit output.
  Please refer to FrameBatchASR for more detailed information.
class_docstr_tok: ["A","class","for","streaming","frame-based","ASR",".","Inherits","from","FrameBatchASR","and","adds","new","capability","of","returning","the","logit","output",".","Please","refer","to","FrameBatchASR","for","more","detailed","information","."]
code: def transcribe_with_ts(
      self,
      tokens_per_chunk: int,
      delay: int,
  ):
      self.infer_logits()
      self.unmerged = []
      self.part_logprobs = []
      for idx, pred in enumerate(self.all_preds):
          decoded = pred.tolist()
          _stt, _end = (
              len(decoded) - 1 - delay,
              len(decoded) - 1 - delay + tokens_per_chunk,
          )
          self.unmerged += decoded[
              len(decoded)
              - 1
              - delay : len(decoded)
              - 1
              - delay
              + tokens_per_chunk
          ]
          self.part_logprobs.append(
              self.all_logprobs[idx][_stt:_end, :]
          )
      self.unmerged_logprobs = torch.cat(self.part_logprobs, 0)
      assert (
          len(self.unmerged) == self.unmerged_logprobs.shape[0]
      ), "Unmerged decoded result and log prob lengths are different."
      return (
          self.greedy_merge(self.unmerged),
          self.unmerged,
          self.unmerged_logprobs,
      )
  
imports: import copy
  import math
  from typing import Dict, List, Tuple, Type, Union
  import numpy
  import torch
  from omegaconf import OmegaConf
  import nemo.collections.asr
  from nemo.collections.asr.metrics.wer import WER
  from nemo.collections.asr.models import EncDecCTCModel, EncDecCTCModelBPE
  from nemo.collections.asr.parts.submodules.ctc_decoding import CTCBPEDecoding, CTCBPEDecodingConfig, CTCDecoding, CTCDecodingConfig
  from nemo.collections.asr.parts.utils.audio_utils import get_samples
  from nemo.collections.asr.parts.utils.speaker_utils import audio_rttm_map, get_uniqname_from_filepath
  from nemo.collections.asr.parts.utils.streaming_utils import AudioFeatureIterator, FrameBatchASR
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.utils import logging
label_desc: Use image node_id 5 for calling the FrameBatchASRLogits obj's underlying member method code with example usage: obj.transcribe_with_ts(tokens_per_chunk, delay) and returns: self,  self,  self