class_docstr: Text2Speech class.
  
  Examples:
      >>> from espnet2.bin.tts_inference import Text2Speech
      >>> # Case 1: Load the local model and use Griffin-Lim vocoder
      >>> text2speech = Text2Speech(
      >>>     train_config="/path/to/config.yml",
      >>>     model_file="/path/to/model.pth",
      >>> )
      >>> # Case 2: Load the local model and the pretrained vocoder
      >>> text2speech = Text2Speech.from_pretrained(
      >>>     train_config="/path/to/config.yml",
      >>>     model_file="/path/to/model.pth",
      >>>     vocoder_tag="kan-bayashi/ljspeech_tacotron2",
      >>> )
      >>> # Case 3: Load the pretrained model and use Griffin-Lim vocoder
      >>> text2speech = Text2Speech.from_pretrained(
      >>>     model_tag="kan-bayashi/ljspeech_tacotron2",
      >>> )
      >>> # Case 4: Load the pretrained model and the pretrained vocoder
      >>> text2speech = Text2Speech.from_pretrained(
      >>>     model_tag="kan-bayashi/ljspeech_tacotron2",
      >>>     vocoder_tag="parallel_wavegan/ljspeech_parallel_wavegan.v1",
      >>> )
      >>> # Run inference and save as wav file
      >>> import soundfile as sf
      >>> wav = text2speech("Hello, World")["wav"]
      >>> sf.write("out.wav", wav.numpy(), text2speech.fs, "PCM_16")
docstr: Return sid is needed or not in the inference.
docstr_tok: ["Return","sid","is","needed","or","not","in","the","inference","."]
code: def use_lids(self) -> bool:
      """Return sid is needed or not in the inference."""
      return self.tts.langs is not None
  
imports: import argparse
  import logging
  import shutil
  import sys
  import time
  from pathlib import Path
  from typing import Any, Dict, Optional, Sequence, Tuple, Union
  import numpy
  import soundfile
  import torch
  from packaging.version import parse
  from typeguard import check_argument_types
  from espnet2.fileio.npy_scp import NpyScpWriter
  from espnet2.gan_tts.vits import VITS
  from espnet2.tasks.tts import TTSTask
  from espnet2.torch_utils.device_funcs import to_device
  from espnet2.torch_utils.set_all_random_seed import set_all_random_seed
  from espnet2.tts.fastspeech import FastSpeech
  from espnet2.tts.fastspeech2 import FastSpeech2
  from espnet2.tts.tacotron2 import Tacotron2
  from espnet2.tts.transformer import Transformer
  from espnet2.tts.utils import DurationCalculator
  from espnet2.utils import config_argparse
  from espnet2.utils.types import str2bool, str2triple_str, str_or_none
  from espnet.utils.cli_utils import get_commandline_args
label_desc: Use image node_id 6 for calling the Text2Speech obj's underlying member method code with example usage: obj.use_lids() and returns: unknown