class_docstr: SingingGenerate class
  
  Examples:
      >>> import soundfile
      >>> svs = SingingGenerate("config.yml", "model.pth")
      >>> wav = svs("Hello World")[0]
      >>> soundfile.write("out.wav", wav.numpy(), svs.fs, "PCM_16")
class_docstr_tok: ["SingingGenerate","class","Examples",":",">",">",">","import","soundfile",">",">",">","svs","=","SingingGenerate","(","``","config.yml","''",",","``","model.pth","''",")",">",">",">","wav","=","svs","(","``","Hello","World","''",")","[","0","]",">",">",">","soundfile.write","(","``","out.wav","''",",","wav.numpy","(",")",",","svs.fs",",","``","PCM_16","''",")"]
docstr: Build SingingGenerate instance from the pretrained model.
  
  Args:
      model_tag (Optional[str]): Model tag of the pretrained models.
          Currently, the tags of espnet_model_zoo are supported.
      vocoder_tag (Optional[str]): Vocoder tag of the pretrained vocoders.
          Currently, the tags of parallel_wavegan are supported, which should
          start with the prefix "parallel_wavegan/".
  
  Returns:
      SingingGenerate: SingingGenerate instance.
docstr_tok: ["Build","SingingGenerate","instance","from","the","pretrained","model",".","Args",":","model_tag","(","Optional","[","str","]",")",":","Model","tag","of","the","pretrained","models",".","Currently",",","the","tags","of","espnet_model_zoo","are","supported",".","vocoder_tag","(","Optional","[","str","]",")",":","Vocoder","tag","of","the","pretrained","vocoders",".","Currently",",","the","tags","of","parallel_wavegan","are","supported",",","which","should","start","with","the","prefix","``","parallel_wavegan\/","''",".","Returns",":","SingingGenerate",":","SingingGenerate","instance","."]
code: def from_pretrained(
      model_tag: Optional[str] = None,
      vocoder_tag: Optional[str] = None,
      **kwargs: Optional[Any],
  ):
      """Build SingingGenerate instance from the pretrained model.
  
      Args:
          model_tag (Optional[str]): Model tag of the pretrained models.
              Currently, the tags of espnet_model_zoo are supported.
          vocoder_tag (Optional[str]): Vocoder tag of the pretrained vocoders.
              Currently, the tags of parallel_wavegan are supported, which should
              start with the prefix "parallel_wavegan/".
  
      Returns:
          SingingGenerate: SingingGenerate instance.
  
      """
      if model_tag is not None:
          try:
              from espnet_model_zoo.downloader import ModelDownloader
  
          except ImportError:
              logging.error(
                  "`espnet_model_zoo` is not installed. "
                  "Please install via `pip install -U espnet_model_zoo`."
              )
              raise
          d = ModelDownloader()
          kwargs.update(**d.download_and_unpack(model_tag))
  
      if vocoder_tag is not None:
          if vocoder_tag.startswith("parallel_wavegan/"):
              try:
                  from parallel_wavegan.utils import (
                      download_pretrained_model,
                  )
  
              except ImportError:
                  logging.error(
                      "`parallel_wavegan` is not installed. "
                      "Please install via `pip install -U parallel_wavegan`."
                  )
                  raise
  
              from parallel_wavegan import __version__
  
              # NOTE(kan-bayashi): Filelock download is supported from 0.5.2
              assert V(__version__) > V("0.5.1"), (
                  "Please install the latest parallel_wavegan "
                  "via `pip install -U parallel_wavegan`."
              )
              vocoder_tag = vocoder_tag.replace("parallel_wavegan/", "")
              vocoder_file = download_pretrained_model(vocoder_tag)
              vocoder_config = Path(vocoder_file).parent / "config.yml"
              kwargs.update(
                  vocoder_config=vocoder_config,
                  vocoder_file=vocoder_file,
              )
  
          else:
              raise ValueError(f"{vocoder_tag} is unsupported format.")
  
      return SingingGenerate(**kwargs)
  
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 typeguard import check_argument_types
  from espnet2.fileio.npy_scp import NpyScpWriter
  from espnet2.gan_svs.vits import VITS
  from espnet2.svs.singing_tacotron.singing_tacotron import singing_tacotron
  from espnet2.tasks.svs import SVSTask
  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.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 8 for calling the SingingGenerate obj's underlying member method code with example usage: obj.from_pretrained(model_tag, vocoder_tag) and returns: SingingGenerate