class_docstr: CTC beam search decoder from *Flashlight* :cite:`kahn2022flashlight`.
  
  .. devices:: CPU
  
  Note:
      To build the decoder, please use the factory function :func:`ctc_decoder`.
docstr: Finalize the internal state of the decoder.
  
  See :py:meth:`decode_step` for the usage.
  
  .. note::
  
     This method is required only when performing online decoding.
     It is not necessary when performing batch decoding with :py:meth:`__call__`.
docstr_tok: ["Finalize","the","internal","state","of","the","decoder",".","See",":","py",":","meth",":","`","decode_step","`","for","the","usage",".","..","note",":",":","This","method","is","required","only","when","performing","online","decoding",".","It","is","not","necessary","when","performing","batch","decoding","with",":","py",":","meth",":","`","__call__","`","."]
code: def decode_end(self):
      """Finalize the internal state of the decoder.
  
      See :py:meth:`decode_step` for the usage.
  
      .. note::
  
         This method is required only when performing online decoding.
         It is not necessary when performing batch decoding with :py:meth:`__call__`.
      """
      self.decoder.decode_end()
  
imports: from __future__ import annotations
  import itertools
  from abc import abstractmethod
  from collections import namedtuple
  from typing import Dict, List, NamedTuple, Optional, Tuple, Union
  import torch
  from flashlight.lib.text.decoder import CriterionType, LexiconDecoder, LexiconDecoderOptions, LexiconFreeDecoder, LexiconFreeDecoderOptions, LM, LMState, SmearingMode, Trie, ZeroLM
  from flashlight.lib.text.dictionary import create_word_dict, Dictionary, load_words
  from torchaudio.utils import download_asset
label_desc: Use image node_id 5 for calling the CTCDecoder obj's underlying member method code with example usage: obj.decode_end() without return types