code: def from_data_cfg(cls, args, data_cfg: S2TDataConfig):
      vocoder_cfg = data_cfg.vocoder
      assert vocoder_cfg.get("type", "griffin_lim") == "hifigan"
      with open(vocoder_cfg["config"]) as f:
          model_cfg = json.load(f)
      return cls(vocoder_cfg["checkpoint"], model_cfg, fp16=args.fp16)
  
imports: import json
  import logging
  from typing import Dict
  import numpy
  import torch
  import torch.nn.functional
  from torch import nn
  from fairseq.data.audio.audio_utils import TTSSpectrogram, get_fourier_basis, get_mel_filters, get_window
  from fairseq.data.audio.speech_to_text_dataset import S2TDataConfig
  from fairseq.models import BaseFairseqModel, register_model
  from fairseq.models.text_to_speech.codehifigan import CodeGenerator
  from fairseq.models.text_to_speech.hifigan import Generator
  from fairseq.models.text_to_speech.hub_interface import VocoderHubInterface
label_desc: Use image node_id 3 for calling the HiFiGANVocoder obj's underlying member method code with example usage: obj.from_data_cfg(cls, args, data_cfg) and returns: cls