# Chatterboxhd

> Transform voices using Resemble AI's Chatterbox. Convert audio to new voices or your own samples, with expressive results and built-in perceptual watermarking.


## Overview

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


## Pricing

- **Price**: $0.02 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_):
  URL to the source audio file to be voice-converted.
  - Examples: "https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav"

- **`target_voice`** (`TargetVoiceEnum`, _optional_):
  The voice to use for the speech-to-speech request. If neither target_voice nor target_voice_audio_url are provided, a random target voice will be used.
  - Options: `"Aurora"`, `"Blade"`, `"Britney"`, `"Carl"`, `"Cliff"`, `"Richard"`, `"Rico"`, `"Siobhan"`, `"Vicky"`

- **`target_voice_audio_url`** (`string`, _optional_):
  URL to the audio file which represents the voice of the output audio. If provided, this will override the target_voice setting. If neither target_voice nor target_voice_audio_url are provided, the default target voice will be used.
  - Examples: "https://v3.fal.media/files/tiger/0XODRhebRLiBdu8MqgZc5_tmpljqsylwu.wav"

- **`high_quality_audio`** (`boolean`, _optional_):
  If True, the generated audio will be upscaled to 48kHz. The generation of the audio will take longer, but the quality will be higher. If False, the generated audio will be 24kHz.
  - Default: `false`



**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`** (`Audio`, _required_):
  The generated voice-converted audio file.
  - Examples: {"url":"https://v3.fal.media/files/elephant/Kym3zK7hFHjDuyz3tB3W9_tmptvowq60i.wav"}



**Example Response**:

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


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/resemble-ai/chatterboxhd/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(
    "resemble-ai/chatterboxhd/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("resemble-ai/chatterboxhd/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/resemble-ai/chatterboxhd/speech-to-speech)
- [API Documentation](https://fal.ai/models/resemble-ai/chatterboxhd/speech-to-speech/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=resemble-ai/chatterboxhd/speech-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`
