code: def __init__(self, args):
      logger.info("Initializing the GSLM pipeline.")
      self.device = torch.device("cuda")
      if args.seed is not None:
          random.seed(args.seed)
          np.random.seed(args.seed)
          utils.set_torch_seed(args.seed)
  
      self.temperature = args.temperature
      self.tokens_framerate = 0.02  # HuBERT framerate
      self.max_length = 1000
      self.trim_trailing_audio_frames = 200
      self.sampling_kwargs = {
          "temperature": self.temperature,
          "sampling": True,
          "beam": 1,
          "prefix_size": -1,
          "max_len_a": 0.0,
          "max_len_b": self.max_length,
      }
      logger.info("... Loading the language model")
      self.sampler = UnitLanguageModelSampler.from_pretrained(
          args.language_model_data_dir,
      )
      logger.info("=> Done!")
      logger.info("... Loading the encoder")
  
      self.speech_encoder = SpeechEncoder.by_name(
          dense_model_name="hubert-base-ls960",
          quantizer_model_name="kmeans",
          vocab_size=args.vocab_size,
          need_f0=False,
          deduplicate=True,
          f0_normalizer=None,
          f0_quantizer=None,
      ).cuda()
  
      logger.info("=> Done!")
      logger.info("... Loading the vocoder")
      self.resynthesizer = TacotronVocoder.by_name(
          dense_model_name="hubert-base-ls960",
          quantizer_model_name="kmeans",
          vocab_size=args.vocab_size,
      ).cuda()
  
      logger.info("=> Done!")
      logger.info("Pipeline initialized!")
  
file_path: textlesslib/examples/gslm/sample.py
imports: import logging
  import random
  from typing import Optional
  from fairseq import utils
  import numpy
  import torch
  import torchaudio
  from textless.data.speech_encoder import SpeechEncoder
  from textless.vocoders.tacotron2.vocoder import TacotronVocoder
  from sampler import UnitLanguageModelSampler
label_desc: Use image node_id 1 to create a new GslmPipeline object  with example: obj = GslmPipeline(args)