# Audio Transcription (`vivid_astronaut/audio-transcription`) Actor

- **URL**: https://apify.com/vivid\_astronaut/audio-transcription.md
- **Developed by:** [BRAINIALL Team](https://apify.com/vivid_astronaut) (community)
- **Categories:** AI, Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$6.00 / 1,000 minute of audio transcribeds

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/platform/actors/running/actors-in-store#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

## Audio & Video Transcription with Speaker Diarization — by Brainiall

Turn public audio and video URLs into **clean transcripts with timestamps**, optional speaker identification, and ready-to-save SRT or WebVTT captions.

Add one URL or a batch. Each file becomes a structured dataset item that can flow directly into content workflows, search indexes, meeting archives, research pipelines, and accessibility tooling.

### What it does

- **Audio and video URL transcription** — process one file or a whole batch in a single run.
- **Speaker diarization** — identify who spoke when and label each timestamped transcript segment.
- **Structured timestamps** — receive full text plus machine-readable segments with start and end times.
- **Captions on demand** — optionally include SRT, WebVTT, or both with no second conversion step.
- **Resilient batch processing** — temporary rate limits and service errors are retried; one invalid file becomes an error item without stopping the rest of the run.

Powered by the **Brainiall speech service** ([api.brainiall.com](https://app.brainiall.com)) — built for dependable batch workflows.

### Who it's for

- **Media teams** — create editable transcripts and captions for interviews, podcasts, webinars, and recorded video.
- **Researchers and analysts** — preserve who said what and when across recorded conversations.
- **AI builders** — feed timestamped, speaker-aware text into search, summarization, RAG, and agent pipelines.
- **Support and sales teams** — turn call recordings into structured data ready for downstream analysis.
- **Accessibility workflows** — generate SRT and WebVTT caption content from hosted media.

### Input

```json
{
    "mediaUrls": [
        { "url": "https://example.com/interview.mp3" },
        { "url": "https://example.com/product-demo.mp4" }
    ],
    "diarization": true,
    "includeSrt": true,
    "includeVtt": false
}
```

| Field | Description |
|-------|-------------|
| `mediaUrls` | Public HTTP(S) URLs of audio or video files. Each URL produces one dataset item. |
| `diarization` | Identify speakers and add labels to transcript segments. Defaults to `true`. |
| `includeSrt` | Include a ready-to-save SRT caption string. Defaults to `false`. |
| `includeVtt` | Include a ready-to-save WebVTT caption string. Defaults to `false`. |

The Actor downloads each hosted media file into memory before processing it. Files must be no larger than 100 MB; larger downloads produce an error item without stopping the batch.

### Output

One dataset item per media URL:

```json
{
    "media_url": "https://example.com/interview.mp3",
    "status": "succeeded",
    "text": "Welcome to the show. Thanks for having me.",
    "language": "en",
    "duration_seconds": 6.8,
    "billable_minutes": 1,
    "segments": [
        {
            "start": 0.0,
            "end": 2.7,
            "text": "Welcome to the show.",
            "speaker": "SPEAKER_00"
        },
        {
            "start": 3.1,
            "end": 6.8,
            "text": "Thanks for having me.",
            "speaker": "SPEAKER_01"
        }
    ],
    "speaker_turns": [
        { "start": 0.0, "end": 2.9, "speaker": "SPEAKER_00" },
        { "start": 3.0, "end": 6.8, "speaker": "SPEAKER_01" }
    ],
    "srt": "1\n00:00:00,000 --> 00:00:02,700\n[SPEAKER_00] Welcome to the show.\n\n2\n00:00:03,100 --> 00:00:06,800\n[SPEAKER_01] Thanks for having me."
}
```

If one URL is invalid or cannot be processed, it still produces a useful, uncharged error item while the remaining URLs continue:

```json
{
    "media_url": "https://example.com/missing.mp3",
    "status": "failed",
    "error": {
        "type": "media_rejected",
        "message": "The media could not be processed (HTTP 400)."
    }
}
```

Export results as JSON, CSV, or Excel, or consume them through the Apify API.

### Pricing

You pay per **started minute successfully transcribed** through the `minute-transcribed` event. For example, a 75-second successful file uses two transcription-minute events. Failed inputs and incomplete results are not charged. There is no batch minimum; the current per-event price is shown on the Actor run page before you start.

### Why this Actor

Most transcription steps leave you with a wall of text. This Actor returns an automation-ready record: the complete transcript, timestamped segments, speaker attribution, raw speaker turns, and optional caption formats together. Batch isolation and short retries keep one troublesome URL from wasting a full run.

### Tips

- Use direct, publicly reachable media-file URLs rather than links to pages containing an embedded player.
- Turn off speaker identification for single-speaker recordings when you only need text and timestamps.
- Request only the caption formats you need to keep dataset items compact.
- Keep each hosted file at or below 100 MB.

***

Built and maintained by [Brainiall](https://www.brainiall.com) — production AI APIs for speech, documents, vision, and the web.

# Actor input Schema

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

Public HTTP(S) URLs of the audio or video files to transcribe. Add one or many files; each file becomes one dataset item.

## `diarization` (type: `boolean`):

Detect who spoke when and add a speaker label to every transcript segment. The result also includes the raw speaker turns.

## `includeSrt` (type: `boolean`):

Add a ready-to-save SRT subtitle string to every successful result.

## `includeVtt` (type: `boolean`):

Add a ready-to-save WebVTT subtitle string to every successful result.

## Actor input object example

```json
{
  "mediaUrls": [
    {
      "url": "https://example.com/interview.mp3"
    }
  ],
  "diarization": true,
  "includeSrt": false,
  "includeVtt": false
}
```

# 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": [
        {
            "url": "https://example.com/interview.mp3"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vivid_astronaut/audio-transcription").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": [{ "url": "https://example.com/interview.mp3" }] }

# Run the Actor and wait for it to finish
run = client.actor("vivid_astronaut/audio-transcription").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": [
    {
      "url": "https://example.com/interview.mp3"
    }
  ]
}' |
apify call vivid_astronaut/audio-transcription --silent --output-dataset

```

## MCP server setup

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

```

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/lEQfJvoNR6R3HjUcA/builds/TU8QZRhRAyVgKglu6/openapi.json
