> For the complete documentation index, see [llms.txt](https://utca.knowledgator.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://utca.knowledgator.com/tasks/transformerstexttospeech.md).

# TransformersTextToSpeech

Text to speech task

Subclass of [**Task**](/tasks/task.md)**.**&#x20;

## Module: [implementation](/framework-structure.md#implementation).tasks

## Default predictor

This task uses [**TransformersPipeline**](/predictors/transformers-predictors.md#transformerspipeline) by default with this configuration:

{% code overflow="wrap" fullWidth="false" %}

```python
TransformersPipeline(
    cfg=TransformersPipelineConfig(
        task="text-to-speech",
        model="suno/bark-small",
        model_kwargs={
            "do_sample": True,
        },
    ),
    input_class=TransformersTextToSpeechInput,
    output_class=TransformersTextToSpeechOutput
)
```

{% endcode %}

#### **See:**

* [**TransformersPipeline**](/predictors/transformers-predictors.md#transformerspipeline)&#x20;
* [**TransformersPipelineConfig**](/predictors/transformers-predictors.md#transformerspipelineconfig)
* [**TransformersTextToSpeechInput**](/predictors/transformers-schemas.md#transformerstexttospeechinput)
* [**TransformersTextToSpeechOutput**](/predictors/transformers-schemas.md#transformerstexttospeechoutput)

## Methods and properties

Main methods and properties

***

### <mark style="color:blue;">\_\_init\_\_</mark>

#### Arguments:

* <mark style="color:orange;">**predictor**</mark>**&#x20;(**[**Predictor**](/predictors/predictor.md)**\[Any, Any], optional):** Predictor that will be used in task. If equals to None, [**default predictor**](#default-predictor) will be used. Defaults to None.
* <mark style="color:orange;">**preprocess**</mark>**&#x20;(Optional\[**[**Component**](/core/component.md)**], optional):** Component executed before predictor. Defaults to None.
* <mark style="color:orange;">**postprocess**</mark>**&#x20;(Optional\[**[**Component**](/core/component.md)**], optional):** Component executed after predictor. Defaults to None.
* <mark style="color:orange;">**input\_class**</mark>**&#x20;(Type\[**[**Input**](/core/schemas.md#input)**], optional):** Class for input validation. Defaults to [**TransformersTextToSpeechInput**](/predictors/transformers-schemas.md#transformerstexttospeechinput)**.**
* <mark style="color:orange;">**output\_class**</mark>**&#x20;(Type\[**[**Output**](/core/schemas.md#output)**], optional):** Class for output validation. Defaults to [**TransformersTextToSpeechOutput**](/predictors/transformers-schemas.md#transformerstexttospeechoutput)**.**
* <mark style="color:orange;">**name**</mark>**&#x20;(Optional\[str], optional):** Name for identification. If equals to None, class name will be used. Defaults to None.

***

***
