class_docstr: Base `tts` class. Every new `tts` model must inherit this.
  
  It defines common `tts` specific functions on top of `Model` implementation.
class_docstr_tok: ["Base","`","tts","`","class",".","Every","new","`","tts","`","model","must","inherit","this",".","It","defines","common","`","tts","`","specific","functions","on","top","of","`","Model","`","implementation","."]
code: def get_aux_input_from_test_sentences(self, sentence_info):
      if hasattr(self.config, "model_args"):
          config = self.config.model_args
      else:
          config = self.config
  
      # extract speaker and language info
      text, speaker_name, style_wav, language_name = (
          None,
          None,
          None,
          None,
      )
  
      if isinstance(sentence_info, list):
          if len(sentence_info) == 1:
              text = sentence_info[0]
          elif len(sentence_info) == 2:
              text, speaker_name = sentence_info
          elif len(sentence_info) == 3:
              text, speaker_name, style_wav = sentence_info
          elif len(sentence_info) == 4:
              (
                  text,
                  speaker_name,
                  style_wav,
                  language_name,
              ) = sentence_info
      else:
          text = sentence_info
  
      # get speaker  id/d_vector
      speaker_id, d_vector, language_id = None, None, None
      if self.speaker_manager is not None:
          if config.use_d_vector_file:
              if speaker_name is None:
                  d_vector = self.speaker_manager.get_random_embedding()
              else:
                  d_vector = self.speaker_manager.get_d_vector_by_name(
                      speaker_name
                  )
          elif config.use_speaker_embedding:
              if speaker_name is None:
                  speaker_id = self.speaker_manager.get_random_id()
              else:
                  speaker_id = self.speaker_manager.name_to_id[
                      speaker_name
                  ]
  
      # get language id
      if (
          self.language_manager is not None
          and config.use_language_embedding
          and language_name is not None
      ):
          language_id = self.language_manager.name_to_id[language_name]
  
      return {
          "text": text,
          "speaker_id": speaker_id,
          "style_wav": style_wav,
          "d_vector": d_vector,
          "language_id": language_id,
      }
  
imports: import os
  import random
  from typing import Dict, List, Tuple, Union
  import torch
  import torch.distributed
  from coqpit import Coqpit
  from torch import nn
  from torch.utils.data import DataLoader
  from torch.utils.data.sampler import WeightedRandomSampler
  from trainer.torch import DistributedSampler, DistributedSamplerWrapper
  from TTS.model import BaseTrainerModel
  from TTS.tts.datasets.dataset import TTSDataset
  from TTS.tts.utils.data import get_length_balancer_weights
  from TTS.tts.utils.languages import LanguageManager, get_language_balancer_weights
  from TTS.tts.utils.speakers import SpeakerManager, get_speaker_balancer_weights, get_speaker_manager
  from TTS.tts.utils.synthesis import synthesis
  from TTS.tts.utils.visual import plot_alignment, plot_spectrogram
label_desc: Use image node_id 5 for calling the BaseTTS obj's underlying member method code with example usage: obj.get_aux_input_from_test_sentences(sentence_info) and returns: dict