# Chatterbox

> Whether you're working on memes, videos, games, or AI agents, Chatterbox brings your content to life. Use the first tts from resemble ai.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/chatterbox/speech-to-speech`
- **Model ID**: `fal-ai/chatterbox/speech-to-speech`
- **Category**: speech-to-speech
- **Kind**: inference
**Tags**: speech-to-speech



## Pricing

- **Price**: $0.015 per minutes

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:


- **`source_audio_url`** (`string`, _required_)
  - Examples: "https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav"

- **`target_voice_audio_url`** (`string`, _optional_):
  Optional URL to an audio file to use as a reference for the generated speech. If provided, the model will try to match the style and tone of the reference audio.
  - Examples: "https://v3.fal.media/files/tiger/0XODRhebRLiBdu8MqgZc5_tmpljqsylwu.wav"



**Required Parameters Example**:

```json
{
  "source_audio_url": "https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav"
}
```

**Full Example**:

```json
{
  "source_audio_url": "https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav",
  "target_voice_audio_url": "https://v3.fal.media/files/tiger/0XODRhebRLiBdu8MqgZc5_tmpljqsylwu.wav"
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`File`, _required_):
  The generated speech audio
  - Examples: {"url":"https://v3.fal.media/files/kangaroo/RQ_pxc7oPdueYqWUqEbPE_tmpjnzvvzx_.wav"}



**Example Response**:

```json
{
  "audio": {
    "url": "https://v3.fal.media/files/kangaroo/RQ_pxc7oPdueYqWUqEbPE_tmpjnzvvzx_.wav"
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/chatterbox/speech-to-speech \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "source_audio_url": "https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav"
   }'
```

### 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/chatterbox/speech-to-speech",
    arguments={
        "source_audio_url": "https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav"
    },
    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/chatterbox/speech-to-speech", {
  input: {
    source_audio_url: "https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav"
  },
  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/chatterbox/speech-to-speech)
- [API Documentation](https://fal.ai/models/fal-ai/chatterbox/speech-to-speech/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/chatterbox/speech-to-speech)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
