class_docstr: SentencePiece-model-based token processor.
  
  Args:
      sp_model_path (str): path to SentencePiece model.
class_docstr_tok: ["SentencePiece-model-based","token","processor",".","Args",":","sp_model_path","(","str",")",":","path","to","SentencePiece","model","."]
code: def __init__(self, sp_model_path: str) -> None:
      if not module_utils.is_module_available("sentencepiece"):
          raise RuntimeError(
              "SentencePiece is not available. Please install it."
          )
  
      import sentencepiece as spm
  
      self.sp_model = spm.SentencePieceProcessor(
          model_file=sp_model_path
      )
      self.post_process_remove_list = {
          self.sp_model.unk_id(),
          self.sp_model.eos_id(),
          self.sp_model.pad_id(),
      }
  
imports: import json
  import math
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from functools import partial
  from typing import Callable, List, Tuple
  import torch
  import torchaudio
  from torchaudio._internal import module_utils
  from torchaudio.models import emformer_rnnt_base, RNNT, RNNTBeamSearch
label_desc: Use image node_id 1 to create a new _SentencePieceTokenProcessor object from inherited base classes: _TokenProcessor with example: obj = _SentencePieceTokenProcessor(sp_model_path)