class_docstr: FastPitch model (https://arxiv.org/abs/2006.06873) that is used to generate mel spectrogram from text.
class_docstr_tok: ["FastPitch","model","(","https",":","\/\/arxiv.org\/abs\/2006.06873",")","that","is","used","to","generate","mel","spectrogram","from","text","."]
docstr: This method returns a list of pre-trained model which can be instantiated directly from NVIDIA's NGC cloud.
  Returns:
      List of available pre-trained models.
docstr_tok: ["This","method","returns","a","list","of","pre-trained","model","which","can","be","instantiated","directly","from","NVIDIA","'s","NGC","cloud",".","Returns",":","List","of","available","pre-trained","models","."]
code: def list_available_models(cls) -> "List[PretrainedModelInfo]":
      """
      This method returns a list of pre-trained model which can be instantiated directly from NVIDIA's NGC cloud.
      Returns:
          List of available pre-trained models.
      """
      list_of_models = []
  
      # en-US, single speaker, 22050Hz, LJSpeech (ARPABET).
      model = PretrainedModelInfo(
          pretrained_model_name="tts_en_fastpitch",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_en_fastpitch/versions/1.8.1/files/tts_en_fastpitch_align.nemo",
          description="This model is trained on LJSpeech sampled at 22050Hz with and can be used to generate female English voices with an American accent. It is ARPABET-based.",
          class_=cls,
      )
      list_of_models.append(model)
  
      # en-US, single speaker, 22050Hz, LJSpeech (IPA).
      model = PretrainedModelInfo(
          pretrained_model_name="tts_en_fastpitch_ipa",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_en_fastpitch/versions/IPA_1.13.0/files/tts_en_fastpitch_align_ipa.nemo",
          description="This model is trained on LJSpeech sampled at 22050Hz with and can be used to generate female English voices with an American accent. It is IPA-based.",
          class_=cls,
      )
      list_of_models.append(model)
  
      # en-US, multi-speaker, 44100Hz, HiFiTTS.
      model = PretrainedModelInfo(
          pretrained_model_name="tts_en_fastpitch_multispeaker",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_en_multispeaker_fastpitchhifigan/versions/1.10.0/files/tts_en_fastpitch_multispeaker.nemo",
          description="This model is trained on HiFITTS sampled at 44100Hz with and can be used to generate male and female English voices with an American accent.",
          class_=cls,
      )
      list_of_models.append(model)
  
      # de-DE, single male speaker, grapheme-based tokenizer, 22050 Hz, Thorsten Müller’s German Neutral-TTS Dataset, 21.02
      model = PretrainedModelInfo(
          pretrained_model_name="tts_de_fastpitch_singleSpeaker_thorstenNeutral_2102",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_de_fastpitchhifigan/versions/1.15.0/files/tts_de_fastpitch_thorstens2102.nemo",
          description="This model is trained on a single male speaker data in Thorsten Müller’s German Neutral 21.02 Dataset sampled at 22050Hz and can be used to generate male German voices.",
          class_=cls,
      )
      list_of_models.append(model)
  
      # de-DE, single male speaker, grapheme-based tokenizer, 22050 Hz, Thorsten Müller’s German Neutral-TTS Dataset, 22.10
      model = PretrainedModelInfo(
          pretrained_model_name="tts_de_fastpitch_singleSpeaker_thorstenNeutral_2210",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_de_fastpitchhifigan/versions/1.15.0/files/tts_de_fastpitch_thorstens2210.nemo",
          description="This model is trained on a single male speaker data in Thorsten Müller’s German Neutral 22.10 Dataset sampled at 22050Hz and can be used to generate male German voices.",
          class_=cls,
      )
      list_of_models.append(model)
  
      # de-DE, multi-speaker, 5 speakers, 44100 Hz, HUI-Audio-Corpus-German Clean.
      model = PretrainedModelInfo(
          pretrained_model_name="tts_de_fastpitch_multispeaker_5",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_de_fastpitch_multispeaker_5/versions/1.11.0/files/tts_de_fastpitch_multispeaker_5.nemo",
          description="This model is trained on 5 speakers in HUI-Audio-Corpus-German clean subset sampled at 44100Hz with and can be used to generate male and female German voices.",
          class_=cls,
      )
      list_of_models.append(model)
  
      # es, 174 speakers, 44100Hz, OpenSLR (IPA)
      model = PretrainedModelInfo(
          pretrained_model_name="tts_es_fastpitch_multispeaker",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_es_multispeaker_fastpitchhifigan/versions/1.15.0/files/tts_es_fastpitch_multispeaker.nemo",
          description="This model is trained on 174 speakers in 6 crowdsourced Latin American Spanish OpenSLR datasets sampled at 44100Hz and can be used to generate male and female Spanish voices with Latin American accents.",
          class_=cls,
      )
      list_of_models.append(model)
  
      # zh, single female speaker, 22050Hz, SFSpeech Bilingual Chinese/English dataset, improved model using richer
      # dict and jieba word segmenter for polyphone disambiguation.
      model = PretrainedModelInfo(
          pretrained_model_name="tts_zh_fastpitch_sfspeech",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_zh_fastpitch_hifigan_sfspeech/versions/1.15.0/files/tts_zh_fastpitch_sfspeech.nemo",
          description="This model is trained on a single female speaker in SFSpeech Bilingual Chinese/English dataset"
          " sampled at 22050Hz and can be used to generate female Mandarin Chinese voices. It is improved"
          " using richer dict and jieba word segmenter for polyphone disambiguation.",
          class_=cls,
      )
      list_of_models.append(model)
  
      # en, multi speaker, LibriTTS, 16000 Hz
      # stft 25ms 10ms matching ASR params
      # for use during Enhlish ASR training/adaptation
      model = PretrainedModelInfo(
          pretrained_model_name="tts_en_fastpitch_for_asr_finetuning",
          location="https://api.ngc.nvidia.com/v2/models/nvidia/nemo/tts_en_fastpitch_spectrogram_enhancer_for_asr_finetuning/versions/1.20.0/files/tts_en_fastpitch_for_asr_finetuning.nemo",
          description="This model is trained on LibriSpeech, train-960 subset."
          " STFT parameters follow those commonly used in ASR: 25 ms window, 10 ms hop."
          " This model is supposed to be used with its companion SpetrogramEnhancer for "
          " ASR fine-tuning. Usage for regular TTS tasks is not advised.",
          class_=cls,
      )
      list_of_models.append(model)
  
      return list_of_models
  
imports: import contextlib
  from dataclasses import dataclass, field
  from pathlib import Path
  from typing import List, Optional
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from pytorch_lightning.loggers import TensorBoardLogger
  from nemo.collections.common.parts.preprocessing import parsers
  from nemo.collections.tts.losses.aligner_loss import BinLoss, ForwardSumLoss
  from nemo.collections.tts.losses.fastpitchloss import DurationLoss, EnergyLoss, MelLoss, PitchLoss
  from nemo.collections.tts.models.base import SpectrogramGenerator
  from nemo.collections.tts.modules.fastpitch import FastPitchModule
  from nemo.collections.tts.parts.mixins import FastPitchAdapterModelMixin
  from nemo.collections.tts.parts.utils.callbacks import LoggingCallback
  from nemo.collections.tts.parts.utils.helpers import batch_from_ragged, g2p_backward_compatible_support, plot_alignment_to_numpy, plot_spectrogram_to_numpy, process_batch, sample_tts_input
  from nemo.core.classes import Exportable
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types.elements import Index, LengthsType, MelSpectrogramType, ProbsType, RegressionValuesType, TokenDurationType, TokenIndex, TokenLogDurationType
  from nemo.core.neural_types.neural_type import NeuralType
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 20 for calling the FastPitchModel obj's underlying member method code with example usage: obj.list_available_models(cls) and returns: list_of_models