# Media Transcriber - Audio & Video to Text, SRT, VTT (`sunsun1831/media-transcriber`) Actor

Transcribe any audio or video file into text with timestamps, SRT and VTT subtitles. Whisper runs inside the Actor - no API keys, no setup. MCP-ready for AI agents.

- **URL**: https://apify.com/sunsun1831/media-transcriber.md
- **Developed by:** [SUNSUN 1831](https://apify.com/sunsun1831) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 minute of audio (tiny / base)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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Media Transcriber — audio & video to text, SRT and VTT

Give it a link to an audio or video file. Get back the transcript, timestamped
segments, and ready-to-use subtitle files.

No API key. No `ffmpeg` install. No GPU. The speech model runs inside the Actor,
so there is nothing to set up and no second bill from an external provider.

### What you get

For every file you submit:

| Field | What it is |
|---|---|
| `text` | The full transcript as one string |
| `segments` | `[{start, end, text}]` — seconds, ready to seek with |
| `language` | Detected language code, plus `languageProbability` |
| `durationSeconds` | Length of the media |
| `srtKey` / `vttKey` | Key-value store keys for the subtitle files |

SRT and VTT are written to the run's key-value store as downloadable files.

### Input

```json
{
  "mediaUrls": [
    "https://example.com/interview.mp3",
    "https://example.com/webinar.mp4"
  ],
  "model": "base",
  "language": "",
  "translateToEnglish": false,
  "outputFormats": ["srt", "vtt"],
  "maxFileSizeMb": 500
}
```

- **`mediaUrls`** — upload files directly, or paste links to them. MP3, MP4, WAV,
  M4A, OGG, FLAC, WebM, MOV and anything else FFmpeg can open. A link must point
  straight at the file.
- **`model`** — `tiny`, `base`, `small`, or `medium`. Start with `base`. Move up
  if the audio has accents, background noise, or is not in English.
- **`language`** — ISO-639-1 code such as `en`, `ja`, `es`. Leave empty to
  auto-detect. Setting it explicitly is faster and more reliable on short clips.
- **`translateToEnglish`** — translate the speech into English instead of
  transcribing it as spoken.
- **`maxFileSizeMb`** — hard cap, so a mistyped link cannot run up a bill.

### Pricing

Pay per event, billed per minute of audio — not per run, not per file.

| Event | Price |
|---|---|
| Run start | $0.005 |
| Minute of audio, `tiny` / `base` | $0.02 |
| Minute of audio, `small` / `medium` | $0.05 |

Audio is rounded up to the next whole minute per file. A 3½-minute podcast on
`base` costs $0.005 + 4 × $0.02 = **$0.085**.

### Use it from an AI agent (MCP)

This Actor is exposed as an MCP tool, so an agent can transcribe media without
you writing any glue code. Point your MCP client at Apify's server and call this
Actor by name with `mediaUrls`.

### What it will not do

**Links to video-sharing and social platforms are rejected.** YouTube, TikTok,
Instagram, Facebook, X, Vimeo, SoundCloud, Spotify, Twitch and similar sites
forbid automated downloading in their terms of service, so this Actor refuses
those hosts rather than leaving you exposed.

A paid subscription does not change this. Offline downloads are licensed for
playback inside that platform's own app, not for extraction and reuse.

Use a file you hold the rights to: your own recordings, your podcast's CDN, a
client's upload bucket, a public-domain archive — or just upload the file.

URLs that resolve to private or link-local addresses are rejected too, so the
Actor cannot be pointed at an internal network.

### Notes

- Silence and music return zero segments. That is voice-activity detection
  working correctly, not a failure.
- Very long files are fine; cost scales linearly with duration.
- Files that fail are reported in the dataset with `status` and `error`, and the
  run continues with the remaining URLs.

***

Built with [faster-whisper](https://github.com/SYSTRAN/faster-whisper).
Developed with Claude Code; behaviour verified against real audio by the author.

# Actor input Schema

## `mediaUrls` (type: `array`):

Upload audio or video files, or paste direct links to them (MP3, MP4, WAV, M4A, OGG, FLAC, WebM, MOV...). A link must point straight at the file. Links to video-sharing or social platforms are rejected, because downloading from them would breach those sites' terms of service - upload the file instead if you have the right to use it.

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

Larger models are more accurate but cost more per minute. 'base' is a good default for clear speech; use 'small' or 'medium' for accents, noise, or non-English audio.

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

ISO-639-1 code of the spoken language (for example 'en', 'ja', 'es'). Leave empty to auto-detect.

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

Translate the speech into English instead of transcribing it in the original language.

## `outputFormats` (type: `array`):

Which formats to produce. Plain text and segments are always included in the dataset; SRT and VTT are additionally saved as downloadable files.

## `maxFileSizeMb` (type: `integer`):

Files larger than this are skipped, so a mistyped link cannot run up a bill.

## Actor input object example

```json
{
  "mediaUrls": [
    "https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0010_8k.wav"
  ],
  "model": "base",
  "language": "",
  "translateToEnglish": false,
  "outputFormats": [
    "srt",
    "vtt"
  ],
  "maxFileSizeMb": 500
}
```

# Actor output Schema

## `transcripts` (type: `string`):

One record per submitted URL: full text, timed segments, detected language, and duration. Files that were rejected or failed appear here too, with a status and an error message.

## `subtitleFiles` (type: `string`):

Downloadable subtitle files, one pair per successfully transcribed media file.

# 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 = {
    "mediaUrls": [
        "https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0010_8k.wav"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sunsun1831/media-transcriber").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 = { "mediaUrls": ["https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0010_8k.wav"] }

# Run the Actor and wait for it to finish
run = client.actor("sunsun1831/media-transcriber").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 '{
  "mediaUrls": [
    "https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0010_8k.wav"
  ]
}' |
apify call sunsun1831/media-transcriber --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sunsun1831/media-transcriber"
        }
    }
}
```

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/che3L3H2imUPLIcZw/builds/GEfCaOS1R9STLV9JC/openapi.json
