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",")","."]
code: def _sanitize_parameters(
      self,
      preprocess_params=None,
      forward_params=None,
      generate_kwargs=None,
  ):
      params = {
          "forward_params": forward_params if forward_params else {},
          "generate_kwargs": generate_kwargs if generate_kwargs else {},
      }
  
      if preprocess_params is None:
          preprocess_params = {}
      postprocess_params = {}
  
      return preprocess_params, params, postprocess_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 5 for calling the TextToAudioPipeline obj's underlying member method code with example usage: obj._sanitize_parameters(preprocess_params, forward_params, generate_kwargs) and returns: preprocess_params,  params,  postprocess_params