# Speech & Audio to Text: Whisper Transcription with SRT/VTT (`trophyapps/whisper-transcribe-files`) Actor

Speech to text for audio and video files from direct links. Whisper runs inside the Actor and returns text, timestamped segments and ready-made SRT/VTT subtitles, with language detection. No third-party speech API.

- **URL**: https://apify.com/trophyapps/whisper-transcribe-files.md
- **Developed by:** [Trophy Apps](https://apify.com/trophyapps) (community)
- **Categories:** AI, Videos, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.40 / 1,000 audio minute (base model)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

## Speech & Audio to Text: Whisper Transcription with SRT/VTT

### What does this speech-to-text Actor do?

It **transcribes audio and video files from direct links** (speech to text, plus subtitles) using an open-source **Whisper** speech-recognition model that runs inside the Actor. For each file you get:

- the full **text**;
- **timestamped segments** (start, end, text);
- ready-to-use **SRT and VTT subtitles**;
- the **detected language**, with a confidence value;
- the audio duration and the number of billed minutes.

There's **no third-party speech API**: audio is processed only inside the Actor run on Apify.

Typical uses: transcribing your podcast episodes from their RSS enclosure links, subtitling your own videos, turning meeting or interview recordings into searchable text, and preparing transcripts for LLM pipelines.

### Why run it on Apify?

- Call it from your own code through the **Apify API**, or from AI agents through Apify's MCP server.
- **Schedule** runs, for example to transcribe each new episode, and connect results to webhooks and integrations.
- Download results as JSON, CSV or Excel.
- Batch many files in one run; a failed file doesn't stop the others.

### How to use it

1. Add one or more **media file URLs**: direct links to mp3, m4a, wav, ogg, mp4, webm and similar files, e.g. from your own storage, signed cloud links or podcast feeds.
2. Choose the **model**:
   - `base` (default): fast and low-cost;
   - `small`: more accurate, priced higher.
3. Optionally set the **language** (e.g. `en`, `de`, `fr`). It's detected automatically otherwise.
4. Run the Actor and open the **Output** tab, or fetch the dataset through the API.

Pages on video platforms (YouTube, TikTok and similar) aren't supported. This Actor only downloads direct media files that you supply.

### Input example

```json
{ "audioUrls": ["https://example.com/episode-12.mp3"], "model": "base" }
```

### Output

One dataset item per file:

- `url` (query string removed) and `inputIndex`;
- `status`, `language`, `languageProbability`;
- `durationSec`, `billedMinutes`;
- `text`;
- `segments`;
- `srt` and `vtt` (complete subtitle files as text).

Failed files come back as rows with `status: "error"` and a reason.

### How much does it cost?

You pay **per started minute of audio**, plus a small **start fee per run** (charged per GB of memory) that covers loading the speech model. See the **Pricing** tab for current prices. The `small` model costs more per minute than `base`. Batching several files into one run spreads the start fee across them.

Apart from the start fee, you're **never charged** for:

- failed downloads;
- links that aren't media files;
- files longer than your *Max minutes per file* setting.

The Actor stops before any file that would exceed the maximum charge you set for the run.

### Data handling

- Only **public http(s) hosts** are fetched. Private, loopback and internal addresses are refused, including after redirects.
- Each file is downloaded into the run's temporary storage, processed there, and deleted once that file is done.
- Results go to your run's Apify dataset and are kept according to your Apify account's data-retention settings.
- **Query strings are removed** from URLs in the output and the logs, so signed-URL tokens aren't copied. Use `inputIndex` to match each result to your input list.

### Accuracy and limits

- Whisper `base` handles clear speech well, but makes occasional mistakes with names, place names and rare words. `small` is noticeably better. In our tests both still misheard some 19th-century place names in a poetry reading.
- Check important transcripts before publishing them.
- There's no speaker diarisation (it doesn't label who is speaking).
- Maximum 1 GB per file; the maximum minutes per file is configurable (default 180).
- Only transcribe recordings you have the right to process.

# Actor input Schema

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

Direct links to audio or video files (mp3, m4a, wav, ogg, mp4, webm…), e.g. from your storage, podcast RSS enclosures or signed cloud links. Pages on video platforms are not supported.

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

base: fast and cheap. small: more accurate, priced higher.

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

Optional ISO 639-1 code like en, de, fr. Leave empty to auto-detect.

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

Longer files are rejected (not charged).

## Actor input object example

```json
{
  "audioUrls": [
    "https://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3"
  ],
  "model": "base",
  "maxMinutesPerFile": 180
}
```

# Actor output Schema

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

One dataset item per input.

# 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://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("trophyapps/whisper-transcribe-files").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://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3"] }

# Run the Actor and wait for it to finish
run = client.actor("trophyapps/whisper-transcribe-files").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://archive.org/download/short_poetry_001_librivox/daffodils_wordsworth_64kb.mp3"
  ]
}' |
apify call trophyapps/whisper-transcribe-files --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,trophyapps/whisper-transcribe-files"
        }
    }
}
```

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/WEVlo6Wj8CtswfPkN/builds/kY4AdCVTdVhj8Fdj3/openapi.json
