# Zonos-Audio-Clone

> Clone voice of any person and speak anything in their voice using zonos' voice cloning.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/zonos`
- **Model ID**: `fal-ai/zonos`
- **Category**: text-to-audio
- **Kind**: inference
**Tags**: voice cloning



## Pricing

- **Price**: $0.05 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:


- **`reference_audio_url`** (`string`, _required_):
  The reference audio.
  - Examples: "https://storage.googleapis.com/falserverless/model_tests/zonos/demo_voice_zonos.wav"

- **`prompt`** (`string`, _required_):
  The content generated using cloned voice.
  - Examples: "Fal is the fastest solution for your image generation."



**Required Parameters Example**:

```json
{
  "reference_audio_url": "https://storage.googleapis.com/falserverless/model_tests/zonos/demo_voice_zonos.wav",
  "prompt": "Fal is the fastest solution for your image generation."
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`File`, _required_):
  The generated audio



**Example Response**:

```json
{
  "audio": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/zonos \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "reference_audio_url": "https://storage.googleapis.com/falserverless/model_tests/zonos/demo_voice_zonos.wav",
     "prompt": "Fal is the fastest solution for your image generation."
   }'
```

### 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/zonos",
    arguments={
        "reference_audio_url": "https://storage.googleapis.com/falserverless/model_tests/zonos/demo_voice_zonos.wav",
        "prompt": "Fal is the fastest solution for your image generation."
    },
    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/zonos", {
  input: {
    reference_audio_url: "https://storage.googleapis.com/falserverless/model_tests/zonos/demo_voice_zonos.wav",
    prompt: "Fal is the fastest solution for your image generation."
  },
  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/zonos)
- [API Documentation](https://fal.ai/models/fal-ai/zonos/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/zonos)

### 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)
