code: def __call__(self, raw_audio, sample_rate):
      raw_audio = self.speech_encoder.maybe_resample(
          raw_audio, sample_rate
      )
  
      sample = self.speech_encoder(raw_audio)
      units = sample["units"]
      duration = sample["durations"].sum().item()
      prefix_duration = self.tokens_framerate * duration
      target_duration = self.tokens_framerate * (
          self.max_length - self.trim_trailing_audio_frames
      )
  
      unit_str = " ".join(list(map(str, units.tolist())))
      sampled_unit_str = self.sampler.sample(
          [unit_str], **self.sampling_kwargs
      )[0]
  
      audio = self.resynthesizer(sampled_unit_str)
      audio = audio[
          : int(
              self.resynthesizer.output_sample_rate
              * (prefix_duration + target_duration)
          )
      ]
  
      return audio
  
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 2 for calling the GslmPipeline obj's underlying member method code with example usage: obj.__call__(raw_audio, sample_rate) and returns: audio