# Text to Speech MP3 (Neural English + 100+ Languages) (`toowl/text-to-speech-mp3`) Actor

Turn texts into MP3, WAV, M4A, OGG or FLAC in bulk: a natural English neural voice (Piper) and eSpeak NG voices for 100+ languages including Indonesian. Speed and pitch control, one ZIP. No third-party API. Pay per 1,000 characters.

- **URL**: https://apify.com/toowl/text-to-speech-mp3.md
- **Developed by:** [Chalid Ade](https://apify.com/toowl) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 1,000 characters

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/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 MP3 — neural English voice + 100+ languages

Turn texts into speech files in bulk: **MP3, M4A, OGG, Opus, WAV or FLAC**. A natural-sounding **English neural voice** (Piper "Joe"), and **eSpeak NG** voices for **100+ languages** including Indonesian, Spanish, German, French, Arabic, Hindi and Japanese. Narration, e-learning, IVR prompts, accessibility, video voice-overs, language drills.

### Why use it

- **Bulk**: one file per text, all bundled into one ZIP too.
- **Long texts**: up to 100,000 characters each, read sentence by sentence with natural pauses between sentences and paragraphs.
- **Voices**: Joe (neural, natural English), English male/female and four Indonesian voices (eSpeak), or any eSpeak voice code (`de`, `es+f3`, `fr+m1`, `ar`, `hi`, `ja`, …).
- **Speed and pitch** control; output normalized to −1 dBFS.
- **No third-party API, no cloud TTS bill**: everything runs inside the Actor.
- **Pay per 1,000 characters.** Failed texts are free.

### Input

```json
{
  "texts": [
    "Welcome to our store. Today every order ships free.",
    { "text": "Selamat datang di toko kami.", "voice": "id-f", "name": "welcome-id" }
  ],
  "voice": "en-neural",
  "format": "mp3"
}
```

| Field | Default | Notes |
| --- | --- | --- |
| `texts` | — | Strings, or objects `{ text, name, voice, espeakVoice }` |
| `voice` | `en-neural` | `en-neural`, `en-m`, `en-f`, `id-m`, `id-f`, `id-m2`, `id-f2` |
| `espeakVoice` | — | Any eSpeak NG voice; overrides `voice` |
| `speed` | 1 | 0.5–2 |
| `pitch` | 50 | 0–99 (eSpeak voices) |
| `format` | `mp3` | `mp3`, `m4a`, `ogg`, `opus`, `wav`, `flac` |
| `bitrate` | 128 | kbps |

### Output

```json
{
  "name": "welcome-id",
  "voice": "id-f",
  "characters": 28,
  "duration": 2.4,
  "format": "mp3",
  "downloadUrl": "https://api.apify.com/v2/key-value-stores/…/records/0002-welcome-id.mp3"
}
```

### Voice quality

Joe is a neural (VITS) voice and sounds natural. eSpeak NG voices are formant synthesis: very clear and fast, but recognizably synthetic — good for prompts, drills and drafts.

### Pricing

Pay per event: one event per started **1,000 characters** of each text. Cap any run with "Max cost per run".

### Free browser version

[toowl.my.id/tools/text-to-speech](https://toowl.my.id/tools/text-to-speech/) — the same voices free in your browser.

### Call it from your code

```bash
curl -X POST "https://api.apify.com/v2/acts/toowl~text-to-speech-mp3/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"texts":["Welcome to our store."],"voice":"en-neural","format":"mp3"}'
```

The same call works from Python (`apify-client`), JavaScript, Make, Zapier and n8n (Apify app/node or a plain HTTP request).

### Use it from AI agents (MCP)

Add this Actor as a tool to Claude, Cursor, VS Code or any MCP client through Apify's MCP server:

```
https://mcp.apify.com/?actors=toowl/text-to-speech-mp3
```

The agent can then pass file URLs and read the results itself.

### More toowl file APIs

Speech to text & subtitles, AI vocal remover, text to speech, AI object remover, PDF to Markdown, PDF to Word & Excel, HTML/URL to PDF, OCR, Office to PDF, PDF compressor, PDF merge/split, PDF password protect, PDF to image, image to PDF, bulk watermark, image converter and compressor, background remover, AI upscaler, image to SVG, QR code and barcode generators, QR/barcode reader, favicon generator, video compressor, frame extractor and audio converter. All pay per file, all batch-friendly: [toowl.my.id/en/api](https://toowl.my.id/en/api/).

Questions or a format that fails? Open an issue on the Actor's **Issues** tab.

# Actor input Schema

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

One audio file per entry. Through the API you can pass objects {"text": "…", "name": "file-name", "voice": "id-f"} to set a file name or voice per text.

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

Joe is a neural voice (natural). The others are eSpeak NG (clear but synthetic, very fast).

## `espeakVoice` (type: `string`):

Overrides Voice with any eSpeak NG voice: a language code plus an optional variant, e.g. "de", "es+f3", "fr+m1", "ar", "hi", "ja". 100+ languages.

## `speed` (type: `string`):

0.5 = half speed, 2 = twice as fast.

## `pitch` (type: `integer`):

0–99, 50 = normal.

## `format` (type: `string`):

File type of each speech file.

## `bitrate` (type: `integer`):

For MP3, M4A, OGG and Opus.

## `zip` (type: `boolean`):

Bundle every file into speech-<format>.zip when there are two or more texts.

## Actor input object example

```json
{
  "texts": [
    "Hello! This is toowl. Paste any text and get a natural sounding MP3 back.",
    "Selamat datang di toowl. Ubah teks menjadi suara dalam hitungan detik."
  ],
  "voice": "en-neural",
  "speed": "1",
  "pitch": 50,
  "format": "mp3",
  "bitrate": 128,
  "zip": true
}
```

# Actor output Schema

## `results` (type: `string`):

One row per input, with download links for the results.

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

Result files in the default key-value store, plus a SUMMARY record.

# 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 = {
    "texts": [
        "Hello! This is toowl. Paste any text and get a natural sounding MP3 back.",
        "Selamat datang di toowl. Ubah teks menjadi suara dalam hitungan detik."
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("toowl/text-to-speech-mp3").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 = { "texts": [
        "Hello! This is toowl. Paste any text and get a natural sounding MP3 back.",
        "Selamat datang di toowl. Ubah teks menjadi suara dalam hitungan detik.",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("toowl/text-to-speech-mp3").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 '{
  "texts": [
    "Hello! This is toowl. Paste any text and get a natural sounding MP3 back.",
    "Selamat datang di toowl. Ubah teks menjadi suara dalam hitungan detik."
  ]
}' |
apify call toowl/text-to-speech-mp3 --silent --output-dataset

```

## MCP server setup

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

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/c7zsl0DnKtaf2HQnM/builds/rIOwMFzVJ2RWpVnS6/openapi.json
