code: def __init__(self, root=".", providers=None):
      model_dir = os.path.join(root, "model")
      if providers is None:
          providers = rt.get_available_providers()
      print("Using these as onnxruntime providers:", providers)
  
      phone_list = [
          "AP",
          "SP",
          "a",
          "ai",
          "an",
          "ang",
          "ao",
          "b",
          "c",
          "ch",
          "d",
          "e",
          "ei",
          "en",
          "eng",
          "er",
          "f",
          "g",
          "h",
          "i",
          "ia",
          "ian",
          "iang",
          "iao",
          "ie",
          "in",
          "ing",
          "iong",
          "iu",
          "j",
          "k",
          "l",
          "m",
          "n",
          "o",
          "ong",
          "ou",
          "p",
          "q",
          "r",
          "s",
          "sh",
          "t",
          "u",
          "ua",
          "uai",
          "uan",
          "uang",
          "ui",
          "un",
          "uo",
          "v",
          "van",
          "ve",
          "vn",
          "w",
          "x",
          "y",
          "z",
          "zh",
      ]
      self.ph_encoder = TokenTextEncoder(
          None, vocab_list=phone_list, replace_oov=","
      )
      self.pinyin2phs = cpop_pinyin2ph_func(
          path=os.path.join(
              root, "inference/svs/opencpop/cpop_pinyin2ph.txt"
          )
      )
      self.spk_map = {"opencpop": 0}
  
      options = rt.SessionOptions()
      for provider in providers:
          if "dml" in provider.lower():
              options.enable_mem_pattern = False
              options.execution_mode = rt.ExecutionMode.ORT_SEQUENTIAL
      fs2_path = os.path.join(model_dir, "fs2.onnx")
      q_sample_path = os.path.join(model_dir, "q_sample.onnx")
      p_sample_path = os.path.join(model_dir, "p_sample.onnx")
      pe_path = os.path.join(model_dir, "pe.onnx")
      vocoder_path = os.path.join(model_dir, "vocoder.onnx")
      self.fs2 = rt.InferenceSession(
          fs2_path, options, providers=providers
      )
      self.q_sample = rt.InferenceSession(
          q_sample_path, options, providers=providers
      )
      self.p_sample = rt.InferenceSession(
          p_sample_path, options, providers=providers
      )
      self.pe = rt.InferenceSession(
          pe_path, options, providers=providers
      )
      self.vocoder = rt.InferenceSession(
          vocoder_path, options, providers=providers
      )
  
      self.K_step = hparams["K_step"]
      self.spec_min = np.asarray(hparams["spec_min"], np.float32)[
          None, None, : hparams["keep_bins"]
      ]
      self.spec_max = np.asarray(hparams["spec_max"], np.float32)[
          None, None, : hparams["keep_bins"]
      ]
      self.mel_bins = hparams["audio_num_mel_bins"]
      self.use_pe = (
          hparams.get("pe_enable") is not None and hparams["pe_enable"]
      )
  
imports: import os
  from collections import deque
  import librosa
  import numpy
  import onnxruntime
  from pypinyin import lazy_pinyin
  from tqdm import tqdm
  from .inference.svs.opencpop.map import cpop_pinyin2ph_func
  from .utils.hparams import hparams
  from .utils.text_encoder import TokenTextEncoder
label_desc: Use image node_id 1 to create a new Infer object  with example: obj = Infer(root, providers)