class_docstr: A greedy CTC decoder.
  
  Provides a common abstraction for sample level and batch level greedy decoding.
  
  Args:
      blank_index: int index of the blank token. Can be 0 or len(vocabulary).
      preserve_alignments: Bool flag which preserves the history of logprobs generated during
          decoding (sample / batched). When set to true, the Hypothesis will contain
          the non-null value for `logprobs` in it. Here, `logprobs` is a torch.Tensors.
      compute_timestamps: A bool flag, which determines whether to compute the character/subword, or
              word based timestamp mapping the output log-probabilities to discrite intervals of timestamps.
              The timestamps will be available in the returned Hypothesis.timestep as a dictionary.
class_docstr_tok: ["A","greedy","CTC","decoder",".","Provides","a","common","abstraction","for","sample","level","and","batch","level","greedy","decoding",".","Args",":","blank_index",":","int","index","of","the","blank","token",".","Can","be","0","or","len","(","vocabulary",")",".","preserve_alignments",":","Bool","flag","which","preserves","the","history","of","logprobs","generated","during","decoding","(","sample","\/","batched",")",".","When","set","to","true",",","the","Hypothesis","will","contain","the","non-null","value","for","`","logprobs","`","in","it",".","Here",",","`","logprobs","`","is","a","torch.Tensors",".","compute_timestamps",":","A","bool","flag",",","which","determines","whether","to","compute","the","character\/subword",",","or","word","based","timestamp","mapping","the","output","log-probabilities","to","discrite","intervals","of","timestamps",".","The","timestamps","will","be","available","in","the","returned","Hypothesis.timestep","as","a","dictionary","."]
code: def set_decoding_type(self, decoding_type: str):
      super().set_decoding_type(decoding_type)
  
      # Please check train_kenlm.py in scripts/asr_language_modeling/ to find out why we need
      # TOKEN_OFFSET for BPE-based models
      if self.decoding_type == "subword":
          self.token_offset = DEFAULT_TOKEN_OFFSET
  
imports: import math
  import os
  from dataclasses import dataclass, field
  from typing import List, Optional, Tuple, Union
  import torch
  from nemo.collections.asr.parts.utils import rnnt_utils
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.core.classes import Typing, typecheck
  from nemo.core.neural_types import HypothesisType, LengthsType, LogprobsType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 6 for calling the BeamCTCInfer obj's underlying member method code with example usage: obj.set_decoding_type(decoding_type) without return types