class_docstr: Base generative model with convenient generation API.
  
  Args:
      name (str): name of the model.
      compression_model (CompressionModel): Compression model
          used to map audio to invertible discrete representations.
      lm (LMModel): Language model over discrete representations.
      max_duration (float, optional): maximum duration the model can produce,
          otherwise, inferred from the training params.
docstr: Generate samples conditioned on audio prompts and an optional text description.
  
  Args:
      prompt (torch.Tensor): A batch of waveforms used for continuation.
          Prompt should be [B, C, T], or [C, T] if only one sample is generated.
      prompt_sample_rate (int): Sampling rate of the given audio waveforms.
      descriptions (list of str, optional): A list of strings used as text conditioning. Defaults to None.
      progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
docstr_tok: ["Generate","samples","conditioned","on","audio","prompts","and","an","optional","text","description",".","Args",":","prompt","(","torch.Tensor",")",":","A","batch","of","waveforms","used","for","continuation",".","Prompt","should","be","[","B",",","C",",","T","]",",","or","[","C",",","T","]","if","only","one","sample","is","generated",".","prompt_sample_rate","(","int",")",":","Sampling","rate","of","the","given","audio","waveforms",".","descriptions","(","list","of","str",",","optional",")",":","A","list","of","strings","used","as","text","conditioning",".","Defaults","to","None",".","progress","(","bool",",","optional",")",":","Flag","to","display","progress","of","the","generation","process",".","Defaults","to","False","."]
code: def generate_continuation(
      self,
      prompt: torch.Tensor,
      prompt_sample_rate: int,
      descriptions: tp.Optional[tp.List[tp.Optional[str]]] = None,
      progress: bool = False,
      return_tokens: bool = False,
  ) -> tp.Union[torch.Tensor, tp.Tuple[torch.Tensor, torch.Tensor]]:
      """Generate samples conditioned on audio prompts and an optional text description.
  
      Args:
          prompt (torch.Tensor): A batch of waveforms used for continuation.
              Prompt should be [B, C, T], or [C, T] if only one sample is generated.
          prompt_sample_rate (int): Sampling rate of the given audio waveforms.
          descriptions (list of str, optional): A list of strings used as text conditioning. Defaults to None.
          progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
      """
      if prompt.dim() == 2:
          prompt = prompt[None]
      if prompt.dim() != 3:
          raise ValueError(
              "prompt should have 3 dimensions: [B, C, T] (C = 1)."
          )
      prompt = convert_audio(
          prompt,
          prompt_sample_rate,
          self.sample_rate,
          self.audio_channels,
      )
      if descriptions is None:
          descriptions = [None] * len(prompt)
      attributes, prompt_tokens = self._prepare_tokens_and_attributes(
          descriptions, prompt
      )
      assert prompt_tokens is not None
      tokens = self._generate_tokens(
          attributes, prompt_tokens, progress
      )
      if return_tokens:
          return self.generate_audio(tokens), tokens
      return self.generate_audio(tokens)
  
imports: from abc import ABC, abstractmethod
  import typing
  import omegaconf
  import torch
  from .encodec import CompressionModel
  from .lm import LMModel
  from .builders import get_wrapped_compression_model
  from ..data.audio_utils import convert_audio
  from ..modules.conditioners import ConditioningAttributes
  from ..utils.autocast import TorchAutocast
label_desc: Use image node_id 11 for calling the BaseGenModel obj's underlying member method code with example usage: obj.generate_continuation(prompt, prompt_sample_rate, descriptions, progress, return_tokens) and returns: self, self,  tokens