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])
code: def __init__(
      self,
      source,
      save_path,
      revision=None,
      bandwidth=1.5,
      freeze=True,
  ):
      super().__init__()
      self.source = source
      self.save_path = save_path
      self.revision = revision
      self.model = self._load_model()
      self.freeze = freeze
      self.bandwidth = bandwidth
      self.bandwidth_id = (
          (torch.tensor(BANDWIDTHS) - bandwidth).abs().argmin().item()
      )
      if self.freeze:
          logger.warning("huggingface_Vocos - Vocos is frozen.")
          for param in self.model.parameters():
              param.requires_grad = False
  
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 1 to create a new Vocos object from inherited base classes: nn with example: obj = Vocos(source, save_path, revision, bandwidth, freeze)