code: def __init__(self, tgt_dict: Dictionary) -> None:
      self.tgt_dict = tgt_dict
      self.vocab_size = len(tgt_dict)
  
      self.blank = (
          tgt_dict.index("<ctc_blank>")
          if "<ctc_blank>" in tgt_dict.indices
          else tgt_dict.bos()
      )
      if "<sep>" in tgt_dict.indices:
          self.silence = tgt_dict.index("<sep>")
      elif "|" in tgt_dict.indices:
          self.silence = tgt_dict.index("|")
      else:
          self.silence = tgt_dict.eos()
  
file_path: fairseq/examples/speech_recognition/new/decoders/base_decoder.py
imports: import itertools
  from typing import Any, Dict, List
  import torch
  from fairseq.data.dictionary import Dictionary
  from fairseq.models.fairseq_model import FairseqModel
label_desc: Use image node_id 1 to create a new BaseDecoder object  with example: obj = BaseDecoder(tgt_dict)