# Audio Transcription — Speech to Text from File URLs (`ponderable_hydrometer/audio-transcribe`) Actor

Transcribe audio and video files from direct links to text with Whisper, in 30-second segments with timestamps. Many languages. Runs inside the Actor, no API key and no external service.

- **URL**: https://apify.com/ponderable_hydrometer/audio-transcribe.md
- **Developed by:** [Ponderable Hydrometer](https://apify.com/ponderable_hydrometer) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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 Transcription — Speech to Text from File URLs

**Turn audio and video files into text.** Give it direct links to files; it returns the transcript in 30-second segments with timestamps. It runs the Whisper speech model (whisper.cpp) inside the Actor, so there is no key to bring and your audio is not sent to a third-party service.

### What you get

One row per 30-second segment with speech: `audioUrl`, `segment`, `startSecs`, `endSecs`, `totalSecs`, `text`, `language`.

### Output sample

```json
{
  "audioUrl": "https://example.com/interview.mp3",
  "segment": 1,
  "startSecs": 0,
  "endSecs": 30,
  "totalSecs": 642,
  "text": "And so my fellow Americans, ask not what your country can do for you.",
  "language": "en"
}
```

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `audioUrls` | array | — | Direct links to files such as MP3, WAV, M4A, OGG, MP4. |
| `language` | string | `"auto"` | Language code, e.g. en, ro, de. "auto" detects it. |
| `maxMinutesPerFile` | integer | `60` | Only the first part of longer files is transcribed. |

### What you can do with it

- **Turn interviews, calls and lectures into searchable text**: one row per 30-second segment, each with its start and end time.
- **Add a transcript to a pipeline** (search, summaries, tagging) without holding a speech-to-text API key.
- **Batch-process an archive**: list many file links in one run.
- **Keep audio inside one Actor**: the model runs in the container; the files are not sent to another service.

### Input example

```json
{
  "audioUrls": ["https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/ted_60.wav"],
  "language": "auto",
  "maxMinutesPerFile": 60
}
```

Set `language` to a code such as `en`, `ro` or `de` when you know it. `maxMinutesPerFile` (1-600) caps how much of each file is transcribed.

### What it costs, by example

One result is one 30-second segment that contains speech, so continuous speech costs about $0.006 per minute of audio: a 10-minute interview is roughly 20 results, about $0.06, plus the small per-run start event. A 30-second segment with no speech is not billed.

### Use it from the API or an AI agent

```bash
curl -X POST "https://api.apify.com/v2/acts/ponderable_hydrometer~audio-transcribe/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"audioUrls": ["https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav"]}'
```

Through the Apify MCP server: `https://mcp.apify.com?tools=ponderable_hydrometer/audio-transcribe`.

### How it works

The file is downloaded, converted to 16 kHz mono with ffmpeg, and transcribed by whisper.cpp with the multilingual Whisper `tiny` model on the Actor's CPU. Whisper's phrases are grouped into 30-second segments by start time; non-speech tags such as "\[music]" are dropped. `totalSecs` is the end of the last segment Whisper recognised, not necessarily the file's length.

### Limits and good to know

- **Direct file links only** (MP3, WAV, M4A, OGG, MP4 and similar). Pages of YouTube, Instagram, TikTok and similar sites are not supported.
- **Accuracy.** The `tiny` model is chosen for speed and price. Clear speech works well; noisy audio, music, heavy accents and rare names are its weak spots. It does not identify speakers.
- **Length cap.** Only the first `maxMinutesPerFile` minutes (default 60) of each file are transcribed.
- **Segments, not subtitles.** For timed captions in SRT or VTT, use the Subtitle Generator Actor instead.
- **Silence and failures.** Silent segments and files that cannot be read produce no row and no result fee. If every file fails, the run ends as FAILED.

### FAQ

**Is my audio sent to a third party?** No. Transcription runs inside the Actor.

**Can it transcribe a podcast feed or a YouTube video?** No, only direct links to the media file.

**Which languages?** The languages Whisper's multilingual model covers; set the code or leave `auto` and read the detected `language` in each row.

### Pricing

Pay per result — **$3.00 per 1,000 results** (one 30-second segment with speech = one result, so about $0.006 per minute of audio), plus Apify's standard per-run start event ($0.00005 per GB of memory, so a fraction of a cent per run). No subscription.

# Actor input Schema

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

Direct links to files such as MP3, WAV, M4A, OGG, MP4.

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

Language code, e.g. en, ro, de. "auto" detects it.

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

Only the first part of longer files is transcribed.

## Actor input object example

```json
{
  "audioUrls": [
    "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav",
    "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/ted_60.wav"
  ],
  "language": "auto",
  "maxMinutesPerFile": 60
}
```

# Actor output Schema

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

All rows produced by this run, as JSON.

# 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://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav",
        "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/ted_60.wav"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ponderable_hydrometer/audio-transcribe").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://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav",
        "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/ted_60.wav",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ponderable_hydrometer/audio-transcribe").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://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav",
    "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/ted_60.wav"
  ]
}' |
apify call ponderable_hydrometer/audio-transcribe --silent --output-dataset

```

## MCP server setup

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

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/VIhaUqSST0lWiL916/builds/tOqbHT1XtjuT4E7j4/openapi.json
