# AI Voice Generator & Cloner — 646-language TTS + cloning (`synthetic.ia/ai-voice-generator`) Actor

Text to speech and voice cloning over HTTP. Design a voice (gender/age/pitch/accent) or clone one from a short sample, in 646 languages. Returns a WAV URL. Pay per request + per 1000 characters.

- **URL**: https://apify.com/synthetic.ia/ai-voice-generator.md
- **Developed by:** [Synthetic](https://apify.com/synthetic.ia) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 voice requests

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AI Voice Generator & Cloner — TTS + voice cloning in 646 languages

Turn **text into natural speech**, or **clone a voice from a short sample**, over a simple HTTP API. Design a voice by describing it (gender, age, pitch, accent, whisper) or clone one from ~10 seconds of reference audio, then make it say anything — in **646 languages**, with expressive tags like `[laughter]`, `[sigh]`, `[surprise-ah]`. You get back a ready-to-use **WAV** file. No GPU, no model hosting, no subscription — **pay per use**.

- 🗣️ **Text-to-speech** — describe a voice and generate speech instantly
- 🧬 **Voice cloning** — clone from a reference sample (URL or base64) and speak in that voice
- 🌍 **646 languages** — Spanish, English, Japanese, Italian, Portuguese, and hundreds more
- 🎭 **Expressive** — inline tags for laughter, sighs, surprise, questions; adjustable speed & quality
- ⚡ **HTTP API (Standby)** + one-shot runs + usable from AI agents (MCP)
- 💵 **Pay per request + per 1,000 characters** — no monthly plan

### Sample output

```json
{
  "ok": true,
  "mode": "design",
  "url": "https://api.apify.com/v2/key-value-stores/…/records/voice_design_lq3k.wav",
  "contentType": "audio/wav",
  "durationMs": 3200,
  "characters": 61,
  "billedChars1k": 1,
  "language": "es"
}
```

The `url` points at a **WAV 24 kHz mono** file you can download or stream directly.

### How to use

#### As an HTTP API (Standby — recommended)

Base URL: `https://synthetic-ia--ai-voice-generator.apify.actor` with header `Authorization: Bearer <APIFY_TOKEN>`.

| Endpoint | Body | Does |
|---|---|---|
| `POST /tts` | `{ text, language?, gender?, age?, pitch?, whisper?, accent?, speed?, quality? }` | Design a voice and speak → WAV |
| `POST /clone` | `{ text, referenceAudioUrl \| referenceAudioBase64, referenceText?, rightsConfirmed: true, language?, speed?, quality? }` | Clone a voice and speak → WAV |
| `POST /generate` | `{ mode: "design" \| "clone", … }` | Unified endpoint |
| `GET /` | — | Returns this endpoint list as JSON |

```bash
## Text-to-speech (design a warm female narrator, in Spanish)
curl -X POST "https://synthetic-ia--ai-voice-generator.apify.actor/tts" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"text":"Bienvenidos al episodio de hoy. [laughter]","language":"es","gender":"female","age":"young_adult","pitch":"moderate"}'

## Clone a voice from a reference sample and make it read a line
curl -X POST "https://synthetic-ia--ai-voice-generator.apify.actor/clone" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"text":"This is my cloned voice.","referenceAudioUrl":"https://example.com/me-10s.wav","rightsConfirmed":true}'
```

#### As a one-shot run

Set the input (mode, text, voice options) and run once. The result WAV is saved to the run's key-value store as `OUTPUT`, and a record with the URL is pushed to the dataset.

#### From an AI agent

The Actor is exposed over Apify's MCP integration, so an agent can call it as a "generate voice" / "clone voice" tool and get back an audio URL.

### Input

The main fields (see the full input schema in the Console):

- **mode** — `design` (describe the voice) or `clone` (from a sample).
- **text** — what to say (max **5000 characters**). Supports expressive tags.
- **language** — ISO code (`es`, `en`, `ja`…) or English name.
- **Design:** `gender` (female/male), `age` (child…elderly), `pitch` (very\_low…very\_high), `whisper` (ASMR), `accent` (English voices).
- **Clone:** `referenceAudioUrl` or `referenceAudioBase64` (~10s+ clean speech, http(s), max 12 MB), optional `referenceText`, and **`rightsConfirmed: true`** (see Legal).
- **quality** — `fast` / `balanced` / `high` (default). **speed** — 0.5–2.0.

### Pricing

Pay only for what you generate — **no subscription**:

| What | Price (Free tier) |
|---|---|
| Per voice request | **$0.05** |
| Per 1,000 characters | **$0.10** |
| Voice cloning surcharge (per clone) | **$0.15** |

Prices drop on higher usage tiers (down to $0.03 / $0.06 / $0.08). Platform usage is included.

**Examples:** a 200-character TTS line ≈ **$0.15**. A 1,000-character narration ≈ **$0.15**. A 500-character **clone** ≈ **$0.30**. That's typically **2–3× cheaper than subscription TTS services** for text-to-speech, and cloning is **pay-per-use** with no monthly plan.

Need MP3 instead of WAV? Chain the **[ffmpeg API](https://apify.com/synthetic.ia/ffmpeg-api)** Actor to transcode `/extract-audio` or `/convert`.

### Related Actors

- **[ffmpeg API](https://apify.com/synthetic.ia/ffmpeg-api)** — convert the WAV to MP3, or mix voice over video.
- **[Live Stream Clipper](https://apify.com/synthetic.ia/live-stream-clipper)** — clip live streams; pair with voiceover.

### FAQ

**Which languages?** 646, including Spanish, English, Japanese, Italian, Portuguese, and many more. Pass the ISO code or English name.

**How long can the text be?** Up to 5,000 characters per call. Split longer scripts into multiple calls.

**What audio do I get?** WAV, 24 kHz, mono. Convert to MP3 with the ffmpeg API Actor if needed.

**Why the first call is slow.** The engine may cold-start (~40–60 s) if it has been idle; subsequent calls are fast. The per-request fee covers this.

**Do you keep my audio or reference sample?** The output WAV is stored in your run's key-value store. Reference samples are sent to the voice engine only to produce your clone.

### Legal

**Voice cloning requires consent.** To use clone mode you must set `rightsConfirmed: true`, confirming you **own the voice or are authorized to use it**. Do not clone a person's voice without their permission, and do not use this Actor to impersonate, deceive, or infringe anyone's rights. You are responsible for the text you synthesize and the reference audio you provide. Misuse (fraud, harassment, non-consensual voice cloning, or violating a platform's terms) is prohibited.

# Changelog

This Actor's version history is a separate document: https://apify.com/synthetic.ia/ai-voice-generator/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Design a voice from scratch, or clone one from a reference sample.

## `text` (type: `string`):

What the voice should say (max 5000 characters). Supports expressive tags like \[laughter], \[sigh], \[surprise-ah].

## `language` (type: `string`):

ISO code (es, en, ja, it, pt…) or English name. 646 languages supported.

## `gender` (type: `string`):

Design mode only.

## `age` (type: `string`):

Design mode only.

## `pitch` (type: `string`):

Design mode only.

## `whisper` (type: `boolean`):

Design mode only. Whispered, breathy delivery.

## `accent` (type: `string`):

Design mode only, English voices: american, british, australian, indian…

## `referenceAudioUrl` (type: `string`):

Clone mode: direct http(s) URL to ~10s+ of clean speech (WAV/MP3, max 12 MB).

## `referenceText` (type: `string`):

Clone mode: transcript of the reference audio (optional; improves the clone).

## `rightsConfirmed` (type: `boolean`):

Clone mode: you confirm you own this voice or are authorized to use it. Required to clone.

## `quality` (type: `string`):

Higher quality uses more inference steps.

## `speed` (type: `number`):

0.5 (slow) to 2.0 (fast).

## Actor input object example

```json
{
  "mode": "design",
  "text": "Hola, esta voz fue generada con inteligencia artificial en Apify.",
  "language": "es",
  "gender": "male",
  "age": "middle_aged",
  "pitch": "low",
  "whisper": false,
  "rightsConfirmed": false,
  "quality": "high",
  "speed": 1
}
```

# Actor output Schema

## `result` (type: `string`):

The generated WAV file and its URL.

## `runs` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("synthetic.ia/ai-voice-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("synthetic.ia/ai-voice-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call synthetic.ia/ai-voice-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,synthetic.ia/ai-voice-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gJWlV61bsbpeLABjN/builds/5qrhggs68zKsTjupI/openapi.json
