code: def __init__(
      self,
      model_type: str,
      language: str = "en",
      task: str = "transcribe",
      added_tokens_txt: str = None,
      sot: bool = False,
      speaker_change_symbol: str = "<sc>",
  ):
      assert check_argument_types()
  
      try:
          import whisper.tokenizer
      except Exception as e:
          print("Error: whisper is not properly installed.")
          print(
              "Please install whisper with: cd ${MAIN_ROOT}/tools && "
              "./installers/install_whisper.sh"
          )
          raise e
  
      language = LANGUAGES_CODE_MAPPING.get(language)
      if language is None:
          raise ValueError(
              f"language: {language} unsupported for Whisper model"
          )
      if task not in ["transcribe", "translate"]:
          raise ValueError(
              f"task: {task} unsupported for Whisper model"
          )
  
      if model_type == "whisper_en":
          self.tokenizer = whisper.tokenizer.get_tokenizer(
              multilingual=False
          )
      elif model_type == "whisper_multilingual":
          self.tokenizer = whisper.tokenizer.get_tokenizer(
              multilingual=True, language=language, task=task
          )
          if added_tokens_txt is not None:
              _added_tokens = []
              with open(added_tokens_txt) as f:
                  lines = f.readlines()
                  for line in lines:
                      _added_tokens.append(line.rstrip())
              self.tokenizer.tokenizer.add_tokens(_added_tokens)
      else:
          raise ValueError("tokenizer unsupported:", model_type)
  
      self.tokenizer = copy.deepcopy(self.tokenizer)
      timestamps = [f"<|{i*30/1500:.2f}|>" for i in range(0, 1501)]
      sc = [speaker_change_symbol] if sot else []
      special_tokens = (
          self.tokenizer.tokenizer.additional_special_tokens
          + timestamps
          + sc
      )
      self.tokenizer.tokenizer.add_special_tokens(
          dict(additional_special_tokens=special_tokens)
      )
      self.model_type = model_type
  
file_path: espnet/espnet2/text/whisper_token_id_converter.py
imports: import copy
  import os
  from typing import Iterable, List, Union
  import numpy
  from typeguard import check_argument_types
  from espnet2.text.whisper_tokenizer import LANGUAGES_CODE_MAPPING
label_desc: Use image node_id 1 to create a new OpenAIWhisperTokenIDConverter object  with example: obj = OpenAIWhisperTokenIDConverter(model_type, language, task, added_tokens_txt, sot, speaker_change_symbol)