docstr: Encapsulation of tts and vocoder models for inference.
  
  TODO: handle multi-speaker and GST inference.
  
  Args:
      tts_checkpoint (str): path to the tts model file.
      tts_config (str): path to the tts config file.
      vocoder_checkpoint (str, optional): path to the vocoder model file. Defaults to None.
      vocoder_config (str, optional): path to the vocoder config file. Defaults to None.
      use_cuda (bool, optional): enable/disable cuda. Defaults to False.
docstr_tok: ["Encapsulation","of","tts","and","vocoder","models","for","inference",".","TODO",":","handle","multi-speaker","and","GST","inference",".","Args",":","tts_checkpoint","(","str",")",":","path","to","the","tts","model","file",".","tts_config","(","str",")",":","path","to","the","tts","config","file",".","vocoder_checkpoint","(","str",",","optional",")",":","path","to","the","vocoder","model","file",".","Defaults","to","None",".","vocoder_config","(","str",",","optional",")",":","path","to","the","vocoder","config","file",".","Defaults","to","None",".","use_cuda","(","bool",",","optional",")",":","enable\/disable","cuda",".","Defaults","to","False","."]
code: def __init__(
      self,
      tts_checkpoint,
      tts_config,
      vocoder_checkpoint=None,
      vocoder_config=None,
      use_cuda=False,
  ):
      """Encapsulation of tts and vocoder models for inference.
  
      TODO: handle multi-speaker and GST inference.
  
      Args:
          tts_checkpoint (str): path to the tts model file.
          tts_config (str): path to the tts config file.
          vocoder_checkpoint (str, optional): path to the vocoder model file. Defaults to None.
          vocoder_config (str, optional): path to the vocoder config file. Defaults to None.
          use_cuda (bool, optional): enable/disable cuda. Defaults to False.
      """
      self.tts_checkpoint = tts_checkpoint
      self.tts_config = tts_config
      self.vocoder_checkpoint = vocoder_checkpoint
      self.vocoder_config = vocoder_config
      self.use_cuda = use_cuda
      self.wavernn = None
      self.vocoder_model = None
      self.num_speakers = 0
      self.tts_speakers = None
      self.speaker_embedding_dim = None
      self.seg = self.get_segmenter("en")
      self.use_cuda = use_cuda
      if self.use_cuda:
          assert (
              torch.cuda.is_available()
          ), "CUDA is not availabe on this machine."
      self.load_tts(tts_checkpoint, tts_config, use_cuda)
      if vocoder_checkpoint:
          self.load_vocoder(
              vocoder_checkpoint, vocoder_config, use_cuda
          )
  
imports: import time
  import numpy
  import torch
  import pysbd
  from TTS.utils.audio import AudioProcessor
  from TTS.utils.io import load_config
  from TTS.tts.utils.generic_utils import setup_model
  from TTS.tts.utils.speakers import load_speaker_mapping
  from TTS.vocoder.utils.generic_utils import setup_generator, interpolate_vocoder_input
  from TTS.tts.utils.synthesis import *
  from TTS.tts.utils.text import make_symbols, phonemes, symbols
label_desc: Use image node_id 1 to create a new Synthesizer object from inherited base classes: object with example: obj = Synthesizer(tts_checkpoint, tts_config, vocoder_checkpoint, vocoder_config, use_cuda)