code: def tts(self, text, speaker_idx=None):
      start_time = time.time()
      wavs = []
      sens = self.split_into_sentences(text)
      print(" > Text splitted to sentences.")
      print(sens)
  
      speaker_embedding = self.init_speaker(speaker_idx)
      use_gl = self.vocoder_model is None
  
      for sen in sens:
          # synthesize voice
          waveform, _, _, mel_postnet_spec, _, _ = synthesis(
              self.tts_model,
              sen,
              self.tts_config,
              self.use_cuda,
              self.ap,
              speaker_idx,
              None,
              False,
              self.tts_config.enable_eos_bos_chars,
              use_gl,
              speaker_embedding=speaker_embedding,
          )
          if not use_gl:
              # denormalize tts output based on tts audio config
              mel_postnet_spec = self.ap.denormalize(
                  mel_postnet_spec.T
              ).T
              device_type = "cuda" if self.use_cuda else "cpu"
              # renormalize spectrogram based on vocoder config
              vocoder_input = self.vocoder_ap.normalize(
                  mel_postnet_spec.T
              )
              # compute scale factor for possible sample rate mismatch
              scale_factor = [
                  1,
                  self.vocoder_config["audio"]["sample_rate"]
                  / self.ap.sample_rate,
              ]
              if scale_factor[1] != 1:
                  print(" > interpolating tts model output.")
                  vocoder_input = interpolate_vocoder_input(
                      scale_factor, vocoder_input
                  )
              else:
                  vocoder_input = torch.tensor(vocoder_input).unsqueeze(
                      0
                  )  # pylint: disable=not-callable
              # run vocoder model
              # [1, T, C]
              waveform = self.vocoder_model.inference(
                  vocoder_input.to(device_type)
              )
          if self.use_cuda and not use_gl:
              waveform = waveform.cpu()
          if not use_gl:
              waveform = waveform.numpy()
          waveform = waveform.squeeze()
  
          # trim silence
          waveform = trim_silence(waveform, self.ap)
  
          wavs += list(waveform)
          wavs += [0] * 10000
  
      # compute stats
      process_time = time.time() - start_time
      audio_time = len(wavs) / self.tts_config.audio["sample_rate"]
      print(f" > Processing time: {process_time}")
      print(f" > Real-time factor: {process_time / audio_time}")
      return wavs
  
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 9 for calling the Synthesizer obj's underlying member method code with example usage: obj.tts(text, speaker_idx) and returns: wavs