code: def __init__(
      self,
      hifigan_model_path: str,
      hifigan_config_path: str,
      hifigan_speaker_path: str = None,
      hifigan_style_path: str = None,
      fp16: str = False,
  ) -> None:
      super().__init__()
  
      # Load hifigan config
      with open(hifigan_config_path) as f:
          cfg = json.load(f)
      self.cfg = cfg
  
      # Load hifigan model
      self.model = CodeGenerator(cfg)
      state_dict = torch.load(hifigan_model_path, map_location="cpu")
      self.model.load_state_dict(state_dict["generator"])
      self.model.eval()
      if fp16:
          self.model.half()
      self.model.remove_weight_norm()
      print("CodeHiFiGAN model loaded!")
  
      # Load hifigan metadata (if exists)
      self.speakers, self.styles = load_vocoder_meta(
          speakers_path=hifigan_speaker_path,
          styles_path=hifigan_style_path,
      )
  
      # Useful for detecting device
      self.register_buffer(
          "_float_tensor", torch.tensor([0], dtype=torch.float)
      )
  
file_path: textlesslib/textless/vocoders/hifigan/vocoder.py
imports: import torch
  import torch.nn
  import numpy
  from .generator import CodeGenerator
  import json
  from typing import Union
  from pathlib import Path
  from textless.checkpoint_manager import CHECKPOINT_MANAGER
label_desc: Use image node_id 1 to create a new CodeHiFiGANVocoder object from inherited base classes: nn with example: obj = CodeHiFiGANVocoder(hifigan_model_path, hifigan_config_path, hifigan_speaker_path, hifigan_style_path, fp16)