# Audio & Video Transcriber: Speech to Text with Timestamps (`rowforge/audio-video-transcriber`) Actor

Transcribe speech from direct links to audio and video files (MP3, WAV, M4A, AAC, OGG, OPUS, FLAC, MP4, MOV, WEBM, MKV) to text with timestamps using local CPU faster-whisper.

- **URL**: https://apify.com/rowforge/audio-video-transcriber.md
- **Developed by:** [Rowforge Data](https://apify.com/rowforge) (community)
- **Categories:** AI, Videos
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 audio minutes

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

## Audio & Video Transcriber: Speech to Text with Timestamps

Transcribe spoken words from direct links to audio and video files into high-accuracy text with optional timestamps. Powered by `faster-whisper` running locally on CPU with 8-bit quantization (`int8`).

### Price

Price: $0.01 per started minute of audio processed (plus $0.001 per run start). Error rows are free.

### What It Does

Given direct public links to audio or video files, this Actor:

1. Downloads each file using streaming with SSRF protection (up to 200 MB per file).
2. Decodes audio streams using bundled PyAV (`libavcodec` / `libavformat` without GPL dependencies).
3. Transcribes speech accurately into text using a pre-warmed multilingual `base` Whisper model.
4. Generates timestamped segments (`start`, `end`, `text`) for every spoken phrase.
5. Emits clean dataset rows with language detection, probability scores, audio duration, and processing metrics.
6. Operates without any external API keys or cloud speech services.

### What It Does Not Do

- **No YouTube or social video links**: Only direct public URLs pointing to raw audio/video files are supported. Submitting a link to a streaming or social platform (YouTube, TikTok, Vimeo, etc.) returns an explicit error row explaining that direct file URLs are required.
- **No live streams**: Real-time or live audio/video streams (HLS/RTMP) are not supported.
- **No speaker diarization**: The Actor transcribes all spoken speech but does not separate or identify individual speakers.

### Input

Configure your run via `.actor/input_schema.json` with the following parameters:

| Field | Type | Default | Description |
|---|---|---|---|
| `urls` | Array of strings | *(Required)* | Direct URLs to audio or video files (up to 100 per run). |
| `language` | String | `"auto"` | Spoken language code (`"en"`, `"es"`, `"de"`, `"it"`) or `"auto"` for automatic detection. |
| `maxMinutesPerFile` | Integer | `60` | Maximum minutes of audio to process per file (min: 1, max: 240). Longer files are truncated. |
| `timestamps` | Boolean | `true` | When true, includes detailed timestamped segment breakdown. |

#### Supported File Formats

- **Audio**: MP3, WAV, M4A, AAC, OGG, OPUS, FLAC
- **Video**: MP4, MOV, WEBM, MKV

### Output

Results are stored in the run's default dataset. Each processed file generates one dataset row.

#### Sample Output Row

```json
{
  "url": "https://example.com/audio/meeting.mp3",
  "status": "ok",
  "error": null,
  "fileType": "mp3",
  "durationSeconds": 124.5,
  "minutesProcessed": 3,
  "truncated": false,
  "language": "en",
  "languageProbability": 0.9982,
  "text": "Welcome to our quarterly project review. Today we will cover our engineering milestones and product roadmap.",
  "segments": [
    {
      "start": 0.0,
      "end": 3.8,
      "text": "Welcome to our quarterly project review."
    },
    {
      "start": 4.1,
      "end": 9.2,
      "text": "Today we will cover our engineering milestones and product roadmap."
    }
  ],
  "chars": 107,
  "seconds": 2.45
}
```

#### Error Rows

If a URL is broken, points to an HTML webpage instead of a direct file, or contains no audio track, an error row is recorded in the dataset and the run continues to the next URL:

```json
{
  "url": "https://example.com/page.html",
  "status": "error",
  "error": "Direct audio/video file link expected; received HTML page. Links to streaming or social video platforms (e.g. YouTube) are not supported.",
  "fileType": null,
  "durationSeconds": 0.0,
  "minutesProcessed": 0,
  "truncated": false,
  "language": null,
  "languageProbability": null,
  "text": "",
  "segments": null,
  "chars": 0,
  "seconds": 0.12
}
```

### Limits

- **File size**: Maximum 200 MB per file.
- **Batch size**: Up to 100 unique URLs per run.
- **Audio duration**: Default 60 minutes per file (configurable up to 240 minutes via `maxMinutesPerFile`). Files exceeding the limit are truncated with `truncated: true`. If audio decoding fails part-way through a file, completed minutes already transcribed are retained with `status: "ok"`, `truncated: true`, and the decoding error named in `error`.
- **Timeouts**: 300 seconds total download deadline per file covering redirects and body.
- **Speed and Memory**: Default memory is 4096 MB (configurable between 2048 MB and 8192 MB). A minute of audio takes about 20 s to process at the default memory.
- **Security & SSRF**: HTTP and HTTPS only. Non-globally routable addresses are strictly rejected at connect time with IP pinning to prevent DNS rebinding.

### Languages Tested

The multilingual engine has been tested and verified with synthetic human speech fixtures achieving ≥ 0.85 word accuracy:

- **English** (`en`): 1.0000 word accuracy
- **Spanish** (`es`): 0.9412 word accuracy
- **German** (`de`): 0.9412 word accuracy
- **Italian** (`it`): 1.0000 word accuracy
- **Auto-detection** (`auto`): Detects spoken language and probability dynamically.

# Actor input Schema

## `urls` (type: `array`):

List of direct public URLs to audio or video files (MP3, WAV, M4A, AAC, OGG, OPUS, FLAC, MP4, MOV, WEBM, MKV). Maximum 100 per run. Direct file links only (no streaming/social video links like YouTube).

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

Spoken language code, or 'auto' for automatic speech language detection.

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

Maximum number of audio minutes to process per file (safeguard for long files). Files exceeding this limit are truncated.

## `timestamps` (type: `boolean`):

If true, extracts and includes timestamped speech segments in the dataset row.

## Actor input object example

```json
{
  "urls": [
    "https://raw.githubusercontent.com/SYSTRAN/faster-whisper/master/tests/data/jfk.flac"
  ],
  "language": "auto",
  "maxMinutesPerFile": 60,
  "timestamps": true
}
```

# Actor output Schema

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

Dataset containing transcription results for all processed audio/video URLs.

# 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 = {
    "urls": [
        "https://raw.githubusercontent.com/SYSTRAN/faster-whisper/master/tests/data/jfk.flac"
    ],
    "language": "auto"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rowforge/audio-video-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 = {
    "urls": ["https://raw.githubusercontent.com/SYSTRAN/faster-whisper/master/tests/data/jfk.flac"],
    "language": "auto",
}

# Run the Actor and wait for it to finish
run = client.actor("rowforge/audio-video-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 '{
  "urls": [
    "https://raw.githubusercontent.com/SYSTRAN/faster-whisper/master/tests/data/jfk.flac"
  ],
  "language": "auto"
}' |
apify call rowforge/audio-video-transcriber --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rowforge/audio-video-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/py26XWHbgH9F7MtiL/builds/CPEnIVhcn64Yyrk4G/openapi.json
