code: def get_xtt(
      model_name="tts_models/multilingual/multi-dataset/xtts_v2",
      deepspeed=True,
      use_gpu=True,
      gpu_id="auto",
  ):
      if n_gpus1 == 0:
          use_gpu = False
  
      # By using XTTS you agree to CPML license https://coqui.ai/cpml
      os.environ["COQUI_TOS_AGREED"] = "1"
  
      from TTS.tts.configs.xtts_config import XttsConfig
      from TTS.tts.models.xtts import Xtts
      from TTS.utils.generic_utils import get_user_data_dir
  
      # This will trigger downloading model
      print("Downloading if not downloaded Coqui XTTS V2")
  
      from TTS.utils.manage import ModelManager
  
      ModelManager().download_model(model_name)
      model_path = os.path.join(
          get_user_data_dir("tts"), model_name.replace("/", "--")
      )
      print("XTTS downloaded")
  
      print("Loading XTTS")
      config = XttsConfig()
      config.load_json(os.path.join(model_path, "config.json"))
      # Config will have more correct languages, they may be added before we append here
      ##["en","es","fr","de","it","pt","pl","tr","ru","nl","cs","ar","zh-cn","ja"]
      supported_languages = config.languages
  
      model = Xtts.init_from_config(config)
      model.load_checkpoint(
          config,
          checkpoint_dir=os.path.dirname(
              os.path.join(model_path, "model.pth")
          ),
          checkpoint_path=os.path.join(model_path, "model.pth"),
          vocab_path=os.path.join(model_path, "vocab.json"),
          eval=True,
          use_deepspeed=deepspeed,
      )
      if use_gpu:
          if gpu_id == "auto":
              model.cuda()
          else:
              model.cuda(device="cuda:%d" % gpu_id)
      print("Done loading TTS")
      return model, supported_languages
  
imports: from __future__ import annotations
  import functools
  import io
  import os
  import tempfile
  import numpy
  import uuid
  import subprocess
  import time
  from src.tts_sentence_parsing import init_sentence_state, get_sentence, clean_sentence, detect_language
  from src.tts_utils import prepare_speech, get_no_audio, chunk_speed_change
  from src.utils import cuda_vis_check
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: get_xtt(model_name, deepspeed, use_gpu, gpu_id) and returns: model,  supported_languages