# Speech to Text: Whisper & GPT-4o Audio Transcription API (`pnda/speech-to-text`) Actor

Transcribe audio and video files (MP3, WAV, M4A, OGG, FLAC, MP4, MOV, WebM) to text with Whisper large-v3: full text, timestamped segments, SRT and VTT subtitles, 99 languages, translation to English. Pay per minute of audio.

- **URL**: https://apify.com/pnda/speech-to-text.md
- **Developed by:** [PNDA](https://apify.com/pnda) (community)
- **Features:** Limited permissions
- **Stats:** 4 total users, 4 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $12.00 / 1,000 audio minute (whisper / gpt-4o mini)s

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

## Speech to Text: Whisper & GPT-4o Audio Transcription API

Transcribe **audio and video files** to text: MP3, WAV, M4A, AAC, OGG, OPUS, FLAC, MP4, MOV, MKV, WebM. Get the **full text**, **timestamped segments**, ready-to-use **SRT and VTT subtitles**, the detected **language** (99 languages) and an optional **translation to English**. No API key, **pay per minute of audio**.

- 🎙️ **Whisper large-v3** (OpenAI): the reference open model, timestamps and 99 languages.
- ⚡ **GPT-4o mini Transcribe** and 🎯 **GPT-4o Transcribe**: OpenAI's latest speech models, best on noisy audio and accents (coming soon).
- 👥 **Speaker diarization**: who said what, with timestamps (coming soon).
- 📦 Up to **500 files per run**, up to **3 hours per file**, one row per file.
- 🎯 **Quality score for automation** (optional, $0.04 per file): an AI checks each transcript for hallucinations and for its match with the audio, so your workflow can use it without checking by hand.

For TikTok, Instagram Reels, YouTube, X or Facebook links, use **pnda/social-video-transcript** (it uses the platform captions when they exist).

### Input

| Field | Type | Description |
|---|---|---|
| `audioUrls` | array | Public, direct links to audio or video files (one row per file). |
| `model` | string | `whisper-large-v3` (default), `gpt-4o-mini-transcribe`, `gpt-4o-transcribe`, `whisper-diarization`. |
| `language` | string | ISO 639-1 code (`en`, `fr`...). Empty = automatic detection. |
| `translateToEnglish` | boolean | Transcript translated to English (Whisper models). |
| `includeSegments` | boolean | Timestamped segments (default true). |
| `includeSubtitles` | boolean | Add `srt` and `vtt` subtitles. |
| `numSpeakers` | integer | Diarization only: number of speakers if known. |
| `maxMinutesPerFile` | integer | Longer files are cut (1 to 180, default 180). |
| `qualityScore` | boolean | Paid option ($0.04 per file): hallucination and audio-match score with a pass / review / fail verdict. |

```json
{ "audioUrls": ["https://example.com/podcast-episode.mp3"], "language": "en", "includeSubtitles": true }
```

### Output

```json
{
  "url": "https://example.com/podcast-episode.mp3",
  "status": "success",
  "model": "whisper-large-v3",
  "text": "Welcome to the show...",
  "language": "en",
  "durationSeconds": 1834,
  "segments": [{ "start": 0, "end": 3.2, "text": "Welcome to the show." }],
  "srt": "1\n00:00:00,000 --> 00:00:03,200\nWelcome to the show.\n",
  "chargedMinutes": 31,
  "charged": true
}
```

A file that cannot be read or has no speech gives a free row with `status: "failed"` and the reason.

### Quality score: transcripts on autopilot

Turn on `qualityScore` and each transcript is checked by a multimodal AI that **listens to the first 2 minutes of the audio and reads the transcript**, in two steps:

1. **Coherence**: no typical speech-to-text hallucinations (the same sentence looped, "Thanks for watching" or subtitle credits nobody said, gibberish, sudden wrong language).
2. **Audio match**: on the part it hears, the transcript says what is actually said (no missing, invented or wrong words, names or numbers).

Each row then has `qualityScore` (0-100), `coherenceScore`, `audioMatchScore`, `issues` and `verdict`: `pass` (no critical or major issue, quality >= 75: use it as is), `review` (a major issue such as an invented phrase or a wrong name: a quick look), `fail` (a critical issue such as a looped or invented sentence, or quality < 50: re-run, for example with another model). Ideal for **automated subtitles, podcast notes, meeting minutes and content pipelines** in n8n, Make or Zapier: no more reading every transcript.

### Pricing

Pay per **started minute of audio**, only for transcripts that are delivered.

| Model | Price per minute |
|---|---|
| Whisper large-v3 | $0.012 |
| GPT-4o mini Transcribe | $0.012 |
| GPT-4o Transcribe | $0.0225 |
| Whisper + speaker diarization | $0.03 |

**Quality score** (optional): **$0.04 per scored file** (event `quality-score`), not charged if the checker is unavailable or the file failed.

Before each file, the Actor checks your **Maximum cost per run** covers all its minutes; otherwise it stops there, at no cost.

### FAQ

**Do I need an OpenAI key?** No. Your Apify account is enough.

**Can I use it on the free Apify plan?** No, paid Apify plans only. Runs from a free plan stop at once, at no cost.

**Which formats work?** Any audio or video file ffmpeg can read, from a public direct link. Streaming pages (YouTube, TikTok...) are not files: use pnda/social-video-transcript.

**Is my audio kept?** A small compressed copy is stored in the run's storage only while it is transcribed, then deleted.

# Actor input Schema

## `audioUrls` (type: `array`):

Public, direct links to audio or video files: MP3, WAV, M4A, AAC, OGG, OPUS, FLAC, MP4, MOV, MKV, WebM... (Dropbox / Google Drive direct-download links work). Up to 500 files per run, one row per file. For TikTok, Reels, YouTube or X links, use pnda/social-video-transcript.

## `model` (type: `string`):

Speech-to-text model. Each is billed per started minute of audio at its own price (see Pricing).

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

ISO 639-1 code of the spoken language (en, fr, es, de...). Empty = automatic detection. Setting it improves accuracy on short or noisy files.

## `translateToEnglish` (type: `boolean`):

Return the transcript translated to English (Whisper models only). Same price.

## `includeSegments` (type: `boolean`):

Add the segments (start, end in seconds, text, speaker with diarization) to each row. Whisper models only.

## `includeSubtitles` (type: `boolean`):

Add ready-to-use SRT and WebVTT subtitles to each row (fields srt and vtt). Whisper models only.

## `numSpeakers` (type: `integer`):

whisper-diarization only: the number of speakers if you know it. Empty = automatic.

## `maxMinutesPerFile` (type: `integer`):

Longer files are cut at this length (you pay only the transcribed minutes). Up to 180 minutes.

## `qualityScore` (type: `boolean`):

A multimodal AI listens to the first 2 minutes of the audio and reads the transcript: hallucinations (looped sentences, "Thanks for watching" never said, gibberish) and match with what is actually said. Adds qualityScore, coherenceScore, audioMatchScore (0-100), issues and verdict (pass / review / fail) to each row, so your workflow can use the "pass" transcripts without checking them. $0.04 per scored file (event "quality-score"); nothing extra if the checker is unavailable.

## Actor input object example

```json
{
  "audioUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/1/1f/En-us-hello.ogg"
  ],
  "model": "whisper-large-v3",
  "translateToEnglish": false,
  "includeSegments": true,
  "includeSubtitles": false,
  "maxMinutesPerFile": 180,
  "qualityScore": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All transcripts (JSON, CSV, Excel).

# 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 = {
    "audioUrls": [
        "https://upload.wikimedia.org/wikipedia/commons/1/1f/En-us-hello.ogg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pnda/speech-to-text").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 = { "audioUrls": ["https://upload.wikimedia.org/wikipedia/commons/1/1f/En-us-hello.ogg"] }

# Run the Actor and wait for it to finish
run = client.actor("pnda/speech-to-text").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 '{
  "audioUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/1/1f/En-us-hello.ogg"
  ]
}' |
apify call pnda/speech-to-text --silent --output-dataset

```

## MCP server setup

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

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/HTVFpqgxojxmc7tRd/builds/kovzVz8so2Zz3zSgd/openapi.json
