# Tada

> A unified speech-language model that synchronizes speech and text into a single, cohesive stream via 1:1 alignment.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/tada/3b/text-to-speech`
- **Model ID**: `fal-ai/tada/3b/text-to-speech`
- **Category**: audio-to-audio
- **Kind**: inference


## Pricing

- **Price**: $0.08 per 1000 characters

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`audio_url`** (`string`, _required_):
  URL of the reference audio file for voice cloning. The model will replicate this speaker's voice characteristics.
  - Examples: "https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav"

- **`transcript`** (`string`, _optional_):
  Transcript of the reference audio. For non-English audio, providing a transcript is required since the built-in ASR is English-only. Default value: `""`
  - Default: `""`
  - Examples: "Some call me nature, others call me mother nature."

- **`prompt`** (`string`, _required_):
  The text to synthesize into speech using the reference speaker's voice.
  - Examples: "The autumn leaves danced gracefully through the crisp morning air, painting the cobblestone streets with shades of amber and gold."

- **`language`** (`LanguageEnum`, _optional_):
  Language for text alignment. Use the appropriate code for non-English synthesis. Default value: `"en"`
  - Default: `"en"`
  - Options: `"en"`, `"ar"`, `"ch"`, `"de"`, `"es"`, `"fr"`, `"it"`, `"ja"`, `"pl"`, `"pt"`

- **`num_extra_steps`** (`integer`, _optional_):
  Number of extra autoregressive steps for speech continuation beyond the input text. Useful for generating trailing prosody or silence.
  - Default: `0`
  - Range: `0` to `50`

- **`temperature`** (`float`, _optional_):
  Sampling temperature for text token generation. Must be greater than 0. Higher values produce more varied output. Default value: `0.6`
  - Default: `0.6`

- **`top_p`** (`float`, _optional_):
  Top-p (nucleus) sampling parameter for text generation. Default value: `0.9`
  - Default: `0.9`
  - Range: `0` to `1`

- **`repetition_penalty`** (`float`, _optional_):
  Penalty applied to repeated tokens during generation. Default value: `1.1`
  - Default: `1.1`
  - Range: `1` to `2`

- **`acoustic_cfg_scale`** (`float`, _optional_):
  Classifier-free guidance scale for acoustic feature generation. Default value: `1.6`
  - Default: `1.6`
  - Range: `0` to `10`

- **`noise_temperature`** (`float`, _optional_):
  Temperature for noise in the flow matching diffusion process. Default value: `0.9`
  - Default: `0.9`
  - Range: `0` to `2`

- **`num_inference_steps`** (`integer`, _optional_):
  Number of ODE solver steps for flow matching acoustic generation. More steps improve quality at the cost of speed. Default value: `20`
  - Default: `20`
  - Range: `1` to `50`

- **`speed_up_factor`** (`float`, _optional_):
  Factor to speed up or slow down the generated speech. Values > 1.0 speed up, < 1.0 slow down. Default value: `1`
  - Default: `1`
  - Range: `0.5` to `2`

- **`output_format`** (`OutputFormatEnum`, _optional_):
  The format of the output audio file. Default value: `"wav"`
  - Default: `"wav"`
  - Options: `"wav"`, `"mp3"`



**Required Parameters Example**:

```json
{
  "audio_url": "https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav",
  "prompt": "The autumn leaves danced gracefully through the crisp morning air, painting the cobblestone streets with shades of amber and gold."
}
```

**Full Example**:

```json
{
  "audio_url": "https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav",
  "transcript": "Some call me nature, others call me mother nature.",
  "prompt": "The autumn leaves danced gracefully through the crisp morning air, painting the cobblestone streets with shades of amber and gold.",
  "language": "en",
  "temperature": 0.6,
  "top_p": 0.9,
  "repetition_penalty": 1.1,
  "acoustic_cfg_scale": 1.6,
  "noise_temperature": 0.9,
  "num_inference_steps": 20,
  "speed_up_factor": 1,
  "output_format": "wav"
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`AudioFile`, _required_):
  The generated speech audio file.
  - Examples: {"url":"https://v3b.fal.media/files/b/0a91e54b/Ldhq_0EWjUdnUEwn-Tcrk_nfs9DTGI.wav"}



**Example Response**:

```json
{
  "audio": {
    "url": "https://v3b.fal.media/files/b/0a91e54b/Ldhq_0EWjUdnUEwn-Tcrk_nfs9DTGI.wav"
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/tada/3b/text-to-speech \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "audio_url": "https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav",
     "prompt": "The autumn leaves danced gracefully through the crisp morning air, painting the cobblestone streets with shades of amber and gold."
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/tada/3b/text-to-speech",
    arguments={
        "audio_url": "https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav",
        "prompt": "The autumn leaves danced gracefully through the crisp morning air, painting the cobblestone streets with shades of amber and gold."
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/tada/3b/text-to-speech", {
  input: {
    audio_url: "https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav",
    prompt: "The autumn leaves danced gracefully through the crisp morning air, painting the cobblestone streets with shades of amber and gold."
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/tada/3b/text-to-speech)
- [API Documentation](https://fal.ai/models/fal-ai/tada/3b/text-to-speech/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/tada/3b/text-to-speech)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
