class_docstr: An wrapper for the HuggingFace Vocos model
  
  Arguments
  ---------
  source : str
      A HuggingFace repository identifier or a path
  save_path : str
      The location where the pretrained model will be saved
  revision : str
      The model revision
  bandwidth : float
      The bandwidth value
      Supported:
      1.5, 3.0, 6.0, 12.0
  freeze : bool
      Whether or not parameters should be
      frozen
  
  Example
  -------
  >>> model_hub = "charactr/vocos-encodec-24khz"
  >>> save_path = "savedir"
  >>> model = Vocos(model_hub, save_path)
  >>> tokens = torch.randint(1024, (4, 10, 2))
  >>> length = torch.tensor([1.0, 0.5, 0.75, 1.0])
  >>> audio, out_length = model(tokens, length)
  >>> audio.shape
  torch.Size([4, 3200])
  >>> out_length
  tensor([1.0000, 0.5000, 0.7500, 1.0000])
docstr: Loads the pretrained model. This is a customized implementation of
  Vocos.from_pretrained(), which has been customized to specify an
  alternate cache_dir
code: def _load_model(self):
      """Loads the pretrained model. This is a customized implementation of
      Vocos.from_pretrained(), which has been customized to specify an
      alternate cache_dir"""
      config_path = hf_hub_download(
          repo_id=self.source,
          filename="config.yaml",
          revision=self.revision,
          cache_dir=self.save_path,
      )
      model_path = hf_hub_download(
          repo_id=self.source,
          filename="pytorch_model.bin",
          revision=self.revision,
          cache_dir=self.save_path,
      )
      model = VocosModel.from_hparams(config_path)
      state_dict = torch.load(model_path, map_location="cpu")
      if isinstance(model.feature_extractor, EncodecFeatures):
          encodec_parameters = {
              "feature_extractor.encodec." + key: value
              for key, value in model.feature_extractor.encodec.state_dict().items()
          }
          state_dict.update(encodec_parameters)
      model.load_state_dict(state_dict)
      model.eval()
      return model
  
file_path: speechbrain/speechbrain/lobes/models/huggingface_transformers/vocos.py
imports: import torch
  import logging
  from torch import nn
  from speechbrain.dataio.dataio import length_to_mask
  from huggingface_hub import hf_hub_download
label_desc: Use image node_id 2 for calling the Vocos obj's underlying member method code with example usage: obj._load_model() and returns: model