# Text to Speech (TTS) — 54 AI Voices, MP3/WAV, SRT Subtitles (`steadyscrape/text-to-speech`) Actor

Text to speech (TTS) and AI voice generator, no API key: turn one or many texts into MP3 or WAV voiceovers with SRT and VTT subtitles timed per sentence. 54 Kokoro voices in English, Spanish, French, Italian, Portuguese, Hindi, Japanese and Mandarin. Export to JSON, CSV or Excel, or via API.

- **URL**: https://apify.com/steadyscrape/text-to-speech.md
- **Developed by:** [Steady Scrape](https://apify.com/steadyscrape) (community)
- **Categories:** AI, Videos, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 1,000 characters of speeches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Text to Speech — 54 natural AI voices, MP3/WAV with SRT subtitles, no API key

Turn any text into speech: give it one text or a thousand, and get for each one an **MP3 or WAV audio file** (a public
download link), its duration, and **SRT and WebVTT subtitles timed per sentence**. Optionally, every clip of the run is
also **merged into one file** — a whole voiceover or audiobook chapter in one piece. 54 voices in **American and British
English, Spanish, French, Italian, Brazilian Portuguese, Hindi, Japanese and Mandarin Chinese**.

**The voice model runs inside the Actor.** This text to speech Actor runs [Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M),
an open TTS model (Apache-2.0, commercial use allowed), on Apify's own servers: no ElevenLabs or OpenAI key to bring, no
third-party service your texts are sent to, no monthly plan.

**Pay per 1,000 characters, and only for audio.** US$0.03 per started 1,000 characters (the clip and its subtitles
included), US$0.005 for the merged file. An empty text, a text with nothing to read, an entry with an unknown voice: each
leaves one row that says what happened and **costs nothing**.

### What this text to speech Actor does

- **Many texts in one run.** `text` for one script, `texts` for a list: each becomes its own audio file, named after its
  place and its first words (`001-welcome-to-our-channel.mp3`), so the files sort in your order.
- **Subtitles timed to the audio, not guessed.** Every sentence is spoken on its own and its start and end are measured
  on the audio, so each SRT/VTT cue starts exactly when the voice does. The same times come as `segments` in the row.
- **One merged file** (`mergeIntoOneFile`): all the clips in input order, with the pause you choose between them, and
  one SRT/VTT for the whole thing with every cue shifted to its place.
- **Pauses that follow the text.** A full stop pauses 0.35 s, a line break 0.7 s, a long sentence is cut at its last
  comma. "Mr.", "Dr." and initials like "John F. Kennedy" do not end a sentence.
- **The right voice for the writing.** With `language` on `auto`, a text written in Chinese, Japanese or Hindi is read by
  a voice of that language even when the run's voice is English, and the row says so.
- **Your spending limit and your timeout are respected to the sentence.** If the limit pays for 2,000 more characters
  and the next text has 3,000, the sentences that fit are spoken, the row says `truncated`, and the run stops. The same
  happens when the run's timeout leaves no time to finish a text: what was spoken is delivered and charged, and nothing
  is lost to a timed-out run.
- **Survives platform restarts.** If Apify moves a long run to another server, the texts already delivered are not
  spoken or charged twice.

### Use cases

- **Voiceovers for videos**: faceless YouTube and TikTok channels, product demos, explainer videos, with SRT captions to
  burn in or upload.
- **Audiobooks and articles**: a chapter per text and the merged file for the whole thing; a blog post as a podcast
  episode.
- **Automation pipelines**: n8n, Make or Zapier send a script, get back an MP3 link and subtitles to hand to a video
  editor API.
- **E-learning and accessibility**: narrated lessons, audio versions of documents, language-learning drills at a slower
  `speed`.
- **Apps and games**: hundreds of short prompts, notifications or dialogue lines at once, one file each (each file is
  at least one 1,000-character block: see Pricing).

### Voices and languages

| language | voices (female `f`, male `m`) |
|---|---|
| American English (`en-us`) | af_heart, af_alloy, af_aoede, af_bella, af_jessica, af_kore, af_nicole, af_nova, af_river, af_sarah, af_sky, am_adam, am_echo, am_eric, am_fenrir, am_liam, am_michael, am_onyx, am_puck, am_santa |
| British English (`en-gb`) | bf_alice, bf_emma, bf_isabella, bf_lily, bm_daniel, bm_fable, bm_george, bm_lewis |
| Spanish (`es`) | ef_dora, em_alex, em_santa |
| French (`fr`) | ff_siwis |
| Italian (`it`) | if_sara, im_nicola |
| Brazilian Portuguese (`pt-br`) | pf_dora, pm_alex, pm_santa |
| Hindi (`hi`) | hf_alpha, hf_beta, hm_omega, hm_psi |
| Japanese (`ja`) | jf_alpha, jf_gongitsune, jf_nezumi, jf_tebukuro, jm_kumo |
| Mandarin Chinese (`zh`) | zf_xiaobei, zf_xiaoni, zf_xiaoxiao, zf_xiaoyi, zm_yunjian, zm_yunxi, zm_yunxia, zm_yunyang |

`af_heart` (the default), `af_bella` and `bf_emma` are Kokoro's best-rated English voices. Setting `language` makes a
voice read another language with its own accent (an English voice reading Spanish, for example).

### Input example

```json
{
    "text": "Welcome to our channel! Today we look at three ways to grow tomatoes on a balcony.",
    "texts": [
        "First, pick a pot of at least twenty liters.",
        { "text": "Bienvenidos a nuestro canal.", "voice": "ef_dora", "name": "intro-es" }
    ],
    "voice": "af_heart",
    "language": "auto",
    "speed": 1,
    "audioFormat": "mp3",
    "subtitles": true,
    "mergeIntoOneFile": true,
    "pauseBetweenTextsSeconds": 0.6
}
```

Through the API an entry of `texts` can be an object `{ "text", "name", "voice", "language", "speed" }` to give that text
its own file name, voice, language or speed.

### Output example

One row per text (and one more for the merged file). The form's sample text gives:

```json
{
    "type": "clip",
    "status": "ok",
    "reason": null,
    "index": 1,
    "name": null,
    "text": "Hello! This is a natural sounding voice, made by an open text to speech model. Every sentence also gets its own subtitle, timed to the audio.",
    "characters": 141,
    "billedCharacters": 141,
    "voice": "af_heart",
    "language": "en-us",
    "speed": 1,
    "format": "mp3",
    "audioUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-hello-this-is-a-natural-sounding.mp3?signature=<signature>",
    "audioKey": "001-hello-this-is-a-natural-sounding.mp3",
    "contentType": "audio/mpeg",
    "fileSizeBytes": 115776,
    "durationSeconds": 9.596,
    "sampleRate": 24000,
    "segments": [
        { "start": 0, "end": 0.789, "text": "Hello!" },
        { "start": 1.139, "end": 5.299, "text": "This is a natural sounding voice, made by an open text to speech model." },
        { "start": 5.649, "end": 9.596, "text": "Every sentence also gets its own subtitle, timed to the audio." }
    ],
    "srt": "1\n00:00:00,000 --> 00:00:00,789\nHello!\n\n2\n00:00:01,139 --> 00:00:05,299\nThis is a natural sounding voice, made by an open text to speech model.\n\n3\n00:00:05,649 --> 00:00:09,596\nEvery sentence also gets its own subtitle, timed to the audio.\n",
    "vtt": "WEBVTT\n\n00:00:00.000 --> 00:00:00.789\nHello!\n\n…",
    "srtUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-hello-this-is-a-natural-sounding.srt?signature=<signature>",
    "vttUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-hello-this-is-a-natural-sounding.vtt?signature=<signature>",
    "truncated": false,
    "chargedEvent": "speech-1k-characters",
    "chargedCount": 1,
    "processingSeconds": 2.04,
    "createdAt": "2026-11-05T12:00:00.000Z"
}
```

The links are signed: they open for anyone, without an Apify login, so you can hand them straight to a video editor, a
CMS or a teammate. Every file of the run is also in the run's key-value store.

### Output fields

| field | what it holds |
|---|---|
| `type` | `clip` (one text) or `merged` (every clip of the run joined) |
| `status` | `ok`, or why there is no audio: `empty_text`, `unsupported_text`, `too_long`, `invalid_item`, `failed` (all free) |
| `reason` | what happened, in words; also says when a text was cut by the spending limit or read by another voice |
| `index`, `name` | the text's place in the input (from 1) and the name an API caller gave it |
| `text`, `characters` | the text as it was read (spaces collapsed, emoji dropped) and its length |
| `billedCharacters` | the characters charged; a Chinese or Japanese character counts as two |
| `voice`, `language`, `speed`, `format` | how it was read and stored |
| `audioUrl`, `audioKey`, `contentType`, `fileSizeBytes` | the audio file: public link, key in the run's store, `audio/mpeg` or `audio/wav`, size |
| `durationSeconds`, `sampleRate` | length of the audio, 24,000 Hz |
| `segments` | `{ start, end, text }` for every sentence, in seconds |
| `srt`, `vtt`, `srtUrl`, `vttUrl` | the subtitles inline and as files (null when `subtitles` is off) |
| `truncated` | only the first part of the text was spoken and charged: the spending limit or the run's timeout left no room for the rest (`reason` says which) |
| `chargedEvent`, `chargedCount` | what this row was charged |
| `processingSeconds`, `createdAt` | time the voice took, and when the row was made (UTC) |

### Pricing

Pay per event, nothing per month:

| event | price | when |
|---|---|---|
| `speech-1k-characters` | US$0.03 | per started 1,000 characters of each text turned into audio, its subtitles included |
| `merged-file` | US$0.005 | once per run, when the clips are joined into one file |

A 600-character voiceover costs US$0.03; a 4,500-character article US$0.15; a 60,000-character book (about 70
minutes of audio) US$1.80. Chinese and Japanese characters count as two, because each takes about twice as long to say.
Spaces and punctuation count; repeated spaces, line breaks and emoji do not.

**Each text is counted on its own, and every text costs at least one block**, because each one is its own file: 100
short lines in `texts` cost 100 × US$0.03 = US$3.00 even at 50 characters each. When short lines need not be separate
files, put them in one text, one per line (a line break is a pause), and they cost by their total length.

### Speed

The voice runs on the run's own CPU. The default run memory is 1 GB, which on Apify is a quarter of a CPU core: the
form's sample text is ready in about 15 seconds, and a long text takes about 5 minutes per 1,000 characters of English
(roughly 12,000 characters an hour). **More memory gives the run more CPU and costs the same per character** (the price
is per character, not per minute): give a long article or a book 4 GB.

### Tips

- Write numbers, dates, symbols and acronyms the way you want them read: an unusual acronym may come out letter by
  letter, and a brand name the way it is spelled.
- A line break is a longer pause: put each paragraph on its own line.
- `speed` goes from 0.5 (half as fast) to 2 (twice as fast); 0.9 often sounds calmer for narration.
- WAV is lossless for editing; MP3 (96 kbps) is about 12 times smaller.

### Limits

- Up to 1,000 texts per run and 100,000 characters (about two hours of audio) per text; split a book into chapters.
- A run stops before its timeout instead of losing work: at 1 GB and the default 6-hour timeout that is about 50,000
  characters per run; more memory or a longer timeout speaks more.
- No voice cloning, no SSML and no emotion control: the 54 voices are Kokoro's.
- Kokoro's English voices are its strongest; its Japanese and Mandarin voices are good but plainer.
- The audio files live in the run's storage for your plan's data retention (unnamed storages expire after 7 days by
  default): download what you want to keep.

### Use it from the API, n8n or Make

```bash
curl -X POST "https://api.apify.com/v2/acts/steadyscrape~text-to-speech/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your script here.", "voice": "am_michael"}'
```

The answer is the dataset rows, each with its `audioUrl`. In n8n and Make, use the Apify node's "Run Actor and get
dataset items" with the same input.

### License and fair use

The voices come from Kokoro-82M by hexgrad, released under the Apache-2.0 license, which allows commercial use; the audio
you make is yours to use. This Actor is not affiliated with hexgrad, Kokoro, ElevenLabs or OpenAI. Do not use it to
impersonate a real person or to deceive. Questions or a voice that reads a word wrong: open an issue on this Actor's
page and it will be answered.

# Actor input Schema

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

The text to turn into speech: a script, an article, a chapter. Line breaks become longer pauses. Up to 100,000 characters (about two hours of audio).

## `texts` (type: `array`):

Each line becomes its own audio file, in order, up to 1000 per run. Through the API an entry can also be an object { "text", "name", "voice", "language", "speed" } to give that text its own file name, voice or speed.

## `voice` (type: `string`):

One of Kokoro's 54 voices. The first letter of its id is its language (a American English, b British English, e Spanish, f French, h Hindi, i Italian, j Japanese, p Brazilian Portuguese, z Mandarin), the second its gender.

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

How the text is pronounced. "auto" uses the voice's language, and gives a text written in Chinese, Japanese or Hindi a voice of that language. Pick one to make a voice read another language with its accent.

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

1 is the voice's natural pace; 0.5 is half as fast, 2 twice as fast.

## `audioFormat` (type: `string`):

MP3 (96 kbps, mono, 24 kHz) is about 12 times smaller; WAV (16-bit PCM, mono, 24 kHz) is lossless, for editing.

## `subtitles` (type: `boolean`):

Each audio file gets .srt and .vtt subtitles with one cue per sentence, timed to the audio, as files and inside its row.

## `mergeIntoOneFile` (type: `boolean`):

Joins all the audio files of the run, in input order, into one more file with its own subtitles: a whole voiceover or audiobook chapter in one piece. Charged once per run.

## `pauseBetweenTextsSeconds` (type: `number`):

Silence between one clip and the next inside the merged file.

## Actor input object example

```json
{
  "text": "Hello! This is a natural sounding voice, made by an open text to speech model. Every sentence also gets its own subtitle, timed to the audio.",
  "voice": "af_heart",
  "language": "auto",
  "speed": 1,
  "audioFormat": "mp3",
  "subtitles": true,
  "mergeIntoOneFile": false,
  "pauseBetweenTextsSeconds": 0.6
}
```

# Actor output Schema

## `audio` (type: `string`):

No description

## `files` (type: `string`):

No description

## `summary` (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 = {
    "text": "Hello! This is a natural sounding voice, made by an open text to speech model. Every sentence also gets its own subtitle, timed to the audio."
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadyscrape/text-to-speech").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 = { "text": "Hello! This is a natural sounding voice, made by an open text to speech model. Every sentence also gets its own subtitle, timed to the audio." }

# Run the Actor and wait for it to finish
run = client.actor("steadyscrape/text-to-speech").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 '{
  "text": "Hello! This is a natural sounding voice, made by an open text to speech model. Every sentence also gets its own subtitle, timed to the audio."
}' |
apify call steadyscrape/text-to-speech --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadyscrape/text-to-speech"
        }
    }
}
```

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/8hECq8vAGU1eK7uaK/builds/Vs00UNwInOy6HvCcA/openapi.json
