class_docstr: Text-to-audio generation pipeline using any `AutoModelForTextToWaveform` or `AutoModelForTextToSpectrogram`. This
  pipeline generates an audio file from an input text and optional other conditional inputs.
  
  Example:
  
  ```python
  >>> from transformers import pipeline
  
  >>> pipe = pipeline(model="suno/bark-small")
  >>> output = pipe("Hey it's HuggingFace on the phone!")
  
  >>> audio = output["audio"]
  >>> sampling_rate = output["sampling_rate"]
  ```
  
  Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)
  
  <Tip>
  
  You can specify parameters passed to the model by using [`TextToAudioPipeline.__call__.forward_params`] or
  [`TextToAudioPipeline.__call__.generate_kwargs`].
  
  Example:
  
  ```python
  >>> from transformers import pipeline
  
  >>> music_generator = pipeline(task="text-to-audio", model="facebook/musicgen-small", framework="pt")
  
  >>> # diversify the music generation by adding randomness with a high temperature and set a maximum music length
  >>> generate_kwargs = {
  ...     "do_sample": True,
  ...     "temperature": 0.7,
  ...     "max_new_tokens": 35,
  ... }
  
  >>> outputs = music_generator("Techno music with high melodic riffs", generate_kwargs=generate_kwargs)
  ```
  
  </Tip>
  
  This pipeline can currently be loaded from [`pipeline`] using the following task identifiers: `"text-to-speech"` or
  `"text-to-audio"`.
  
  See the list of available models on [huggingface.co/models](https://huggingface.co/models?filter=text-to-speech).
class_docstr_tok: ["Text-to-audio","generation","pipeline","using","any","`","AutoModelForTextToWaveform","`","or","`","AutoModelForTextToSpectrogram","`",".","This","pipeline","generates","an","audio","file","from","an","input","text","and","optional","other","conditional","inputs",".","Example",":","``","`","python",">",">",">","from","transformers","import","pipeline",">",">",">","pipe","=","pipeline","(","model=","''","suno\/bark-small","''",")",">",">",">","output","=","pipe","(","``","Hey","it","'s","HuggingFace","on","the","phone","!","''",")",">",">",">","audio","=","output","[","``","audio","''","]",">",">",">","sampling_rate","=","output","[","``","sampling_rate","''","]","``","`","Learn","more","about","the","basics","of","using","a","pipeline","in","the","[","pipeline","tutorial","]","(","..","\/pipeline_tutorial",")","<","Tip",">","You","can","specify","parameters","passed","to","the","model","by","using","[","`","TextToAudioPipeline.__call__.forward_params","`","]","or","[","`","TextToAudioPipeline.__call__.generate_kwargs","`","]",".","Example",":","``","`","python",">",">",">","from","transformers","import","pipeline",">",">",">","music_generator","=","pipeline","(","task=","''","text-to-audio","''",",","model=","''","facebook\/musicgen-small","''",",","framework=","''","pt","''",")",">",">",">","#","diversify","the","music","generation","by","adding","randomness","with","a","high","temperature","and","set","a","maximum","music","length",">",">",">","generate_kwargs","=","{","...","``","do_sample","''",":","True",",","...","``","temperature","''",":","0.7",",","...","``","max_new_tokens","''",":","35",",","...","}",">",">",">","outputs","=","music_generator","(","``","Techno","music","with","high","melodic","riffs","''",",","generate_kwargs=generate_kwargs",")","``","`","<","\/Tip",">","This","pipeline","can","currently","be","loaded","from","[","`","pipeline","`","]","using","the","following","task","identifiers",":","`","``","text-to-speech","''","`","or","`","``","text-to-audio","''","`",".","See","the","list","of","available","models","on","[","huggingface.co\/models","]","(","https",":","\/\/huggingface.co\/models","?","filter=text-to-speech",")","."]
docstr: Generates speech/audio from the inputs. See the [`TextToAudioPipeline`] documentation for more information.
  
  Args:
      text_inputs (`str` or `List[str]`):
          The text(s) to generate.
      forward_params (`dict`, *optional*):
          Parameters passed to the model generation/forward method. `forward_params` are always passed to the
          underlying model.
      generate_kwargs (`dict`, *optional*):
          The dictionary of ad-hoc parametrization of `generate_config` to be used for the generation call. For a
          complete overview of generate, check the [following
          guide](https://huggingface.co/docs/transformers/en/main_classes/text_generation). `generate_kwargs` are
          only passed to the underlying model if the latter is a generative model.
  
  Return:
      A `dict` or a list of `dict`: The dictionaries have two keys:
  
      - **audio** (`np.ndarray` of shape `(nb_channels, audio_length)`) -- The generated audio waveform.
      - **sampling_rate** (`int`) -- The sampling rate of the generated audio waveform.
docstr_tok: ["Generates","speech\/audio","from","the","inputs",".","See","the","[","`","TextToAudioPipeline","`","]","documentation","for","more","information",".","Args",":","text_inputs","(","`","str","`","or","`","List","[","str","]","`",")",":","The","text","(","s",")","to","generate",".","forward_params","(","`","dict","`",",","*","optional","*",")",":","Parameters","passed","to","the","model","generation\/forward","method",".","`","forward_params","`","are","always","passed","to","the","underlying","model",".","generate_kwargs","(","`","dict","`",",","*","optional","*",")",":","The","dictionary","of","ad-hoc","parametrization","of","`","generate_config","`","to","be","used","for","the","generation","call",".","For","a","complete","overview","of","generate",",","check","the","[","following","guide","]","(","https",":","\/\/huggingface.co\/docs\/transformers\/en\/main_classes\/text_generation",")",".","`","generate_kwargs","`","are","only","passed","to","the","underlying","model","if","the","latter","is","a","generative","model",".","Return",":","A","`","dict","`","or","a","list","of","`","dict","`",":","The","dictionaries","have","two","keys",":","-","*","*","audio","*","*","(","`","np.ndarray","`","of","shape","`","(","nb_channels",",","audio_length",")","`",")","--","The","generated","audio","waveform",".","-","*","*","sampling_rate","*","*","(","`","int","`",")","--","The","sampling","rate","of","the","generated","audio","waveform","."]
code: def __call__(
      self, text_inputs: Union[str, List[str]], **forward_params
  ):
      """
      Generates speech/audio from the inputs. See the [`TextToAudioPipeline`] documentation for more information.
  
      Args:
          text_inputs (`str` or `List[str]`):
              The text(s) to generate.
          forward_params (`dict`, *optional*):
              Parameters passed to the model generation/forward method. `forward_params` are always passed to the
              underlying model.
          generate_kwargs (`dict`, *optional*):
              The dictionary of ad-hoc parametrization of `generate_config` to be used for the generation call. For a
              complete overview of generate, check the [following
              guide](https://huggingface.co/docs/transformers/en/main_classes/text_generation). `generate_kwargs` are
              only passed to the underlying model if the latter is a generative model.
  
      Return:
          A `dict` or a list of `dict`: The dictionaries have two keys:
  
          - **audio** (`np.ndarray` of shape `(nb_channels, audio_length)`) -- The generated audio waveform.
          - **sampling_rate** (`int`) -- The sampling rate of the generated audio waveform.
      """
      return super().__call__(text_inputs, **forward_params)
  
file_path: transformers/src/transformers/pipelines/text_to_audio.py
imports: from typing import List, Union
  from ..utils import is_torch_available
  from .base import Pipeline
label_desc: Use image node_id 4 for calling the TextToAudioPipeline obj's underlying member method code with example usage: obj.__call__(text_inputs) and returns: super