# Speech to Text — YouTube, TikTok, Instagram, 99+ Languages (`andronixmd/speech-to-text-transcriber`) Actor

Multi-engine speech-to-text for YouTube, TikTok, Instagram, podcasts, X, and direct media URLs. Auto-detects 99+ languages, routes across Groq/OpenAI/ElevenLabs/Google with automatic failover, and returns text, SRT/VTT subtitles, and optional speaker diarization. Pay-per-event — no subscription.

- **URL**: https://apify.com/andronixmd/speech-to-text-transcriber.md
- **Developed by:** [Sergey Andronik](https://apify.com/andronixmd) (community)
- **Categories:** Videos, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

## Speech to Text — Audio & Video Transcriber

Real audio transcription — not caption scraping — for any audio or video URL: YouTube,
TikTok, Instagram, X, podcast links, or direct media files. Auto-detects the spoken
language across **99 languages**, with optional **speaker diarization** to label who said
what, and returns clean text plus ready-to-use **SRT/VTT** subtitle files alongside an
LLM-ready transcript. Works even when a video has no caption track, or the auto-captions
are low quality.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `urls` | array of strings | *(required)* | YouTube/TikTok/Instagram/podcast/X links, or direct `https` media URLs (mp3, wav, m4a, mp4, …). One dataset item per URL. |
| `language` | string | auto-detect | BCP-47 hint (`en`, `ru`, `ro`, …). Leave empty to auto-detect. |
| `timestamps` | `none` \| `segment` \| `word` | `segment` | Granularity of the returned timing information. |
| `diarize` | boolean | `false` | Label speakers `S1`, `S2`, … using premium engines, at the diarized per-minute rate. |
| `provider` | string | auto | Advanced: pin one exact engine (e.g. `"groq/whisper-large-v3"`, `"elevenlabs/scribe_v2"`) instead of automatic tier routing + failover. Fails cleanly if the pinned engine can't serve the request (e.g. no diarization support) or isn't configured on this actor. Leave empty for automatic routing. |

### Worked example

Input:

```json
{
  "urls": ["https://www.youtube.com/watch?v=example12345"],
  "language": "en",
  "timestamps": "segment",
  "diarize": false
}
````

Resulting dataset item (one per URL):

```json
{
  "url": "https://www.youtube.com/watch?v=example12345",
  "text": "Welcome back to the show. Today we're talking about organic growth loops.",
  "language": "en",
  "duration_s": 600.0,
  "engine": "groq/whisper-large-v3",
  "segments": [
    { "t0": 0, "t1": 4.2, "text": "Welcome back to the show." },
    { "t0": 4.2, "t1": 9.8, "text": "Today we're talking about organic growth loops." }
  ],
  "srt": "1\n00:00:00,000 --> 00:00:04,200\nWelcome back to the show.\n\n2\n00:00:04,200 --> 00:00:09,800\nToday we're talking about organic growth loops.\n",
  "vtt": "WEBVTT\n\n00:00:00.000 --> 00:00:04.200\nWelcome back to the show.\n\n00:00:04.200 --> 00:00:09.800\nToday we're talking about organic growth loops.\n",
  "transcript_llm": "Welcome back to the show.\nToday we're talking about organic growth loops.",
  "usage": { "minutes": 10, "diarized": false, "platform_fetch": true }
}
```

The `srt` and `vtt` files are also saved to the run's key-value store as
`transcript-000.srt` / `transcript-000.vtt` (indexed by the URL's position in the input
list) for direct download. A failed URL still produces one dataset row — `{ "url": ...,
"error": "..." }` — so a batch of 50 URLs with one bad link still returns 49 transcripts.

### Add-ons

Three optional post-processing steps run on the already-produced transcript text (not the audio) and are billed only when they succeed:

- `summarize: true` — a 2-4 sentence AI summary (`summary` field, or `summary_error` if it fails).
- `translateTo: "<bcp-47>"` — a full translation of the transcript (`translation: { language, text }`, or `translation_error`).
- `extractKeywords: true` — 5-10 extracted keywords/topics (`keywords` array, or `keywords_error`).

All three require `GEMINI_API_KEY` to be configured on the actor; the run fails fast at startup if one is requested without it. A failed add-on never affects the transcript itself — it already succeeded and was already billed.

### Pricing

Pay-per-event — you only pay for what actually completes.

| Event | Price | When it's charged |
|---|---|---|
| Actor start | $0.005 | Once per run, flat. |
| Platform video fetched | $0.02 | Once per URL, only after a platform video/audio (YouTube, TikTok, Instagram, X, …) is successfully downloaded via yt-dlp. Not charged for direct media URLs. |
| Audio transcribed | $0.03 / minute | Per started minute, only after transcription succeeds. |
| Audio transcribed (diarized) | $0.05 / minute | Per started minute with speaker labels, only after transcription succeeds. |
| Transcript summary | $0.015 / item | Once per URL, only if `summarize` is set and the summary succeeds. |
| Transcript translation | $0.015 / item | Once per URL, only if `translateTo` is set and the translation succeeds. |
| Transcript keywords | $0.008 / item | Once per URL, only if `extractKeywords` is set and extraction succeeds. |

**Example:** a 10-minute YouTube video, no diarization:
`$0.005 + $0.02 + 10 × $0.03 = $0.325`.
The same 10-minute video with diarization enabled:
`$0.005 + $0.02 + 10 × $0.05 = $0.525`.

Direct audio/video URLs skip the $0.02 fetch charge entirely. Nothing is charged for a URL
that fails to download or transcribe.

### How it's different

This actually transcribes the audio — it doesn't scrape a platform's existing caption
track, so it works on videos with no captions, auto-captions in the wrong language, or
audio-only sources like podcasts. It's also not a wrapper around a single model. Every request is routed across multiple
speech-to-text engines — **Groq Whisper, OpenAI, ElevenLabs Scribe, and Google Chirp** —
with automatic failover: if the first engine in the chain is rate-limited, times out, or
rejects the file, the actor retries the next one before giving up. Diarized runs route to
the premium engines (ElevenLabs Scribe, OpenAI's diarization model, Google Chirp) that can
reliably label speakers across a whole recording. You get a transcript back, not a
provider-specific error.

### Use via MCP (AI agents)

For lower latency on short clips, this actor also runs as an always-warm Standby MCP server exposing a single `transcribe_audio(url, language?, diarize?)` tool — connect directly to the actor's Standby URL (Apify Console → this actor → Settings → Standby) instead of the shared `mcp.apify.com` gateway. Billing is identical to the batch actor (per-minute transcription, platform-fetch fee when applicable) — no separate Standby charge.

### Language coverage

Powered by Whisper-family and other models with native support for **~99 languages**.
Leave `language` empty for auto-detection, or pass a BCP-47 hint to skip detection and
speed up routing.

### Privacy

Audio and video are downloaded to a temporary directory only for as long as it takes to
process that one URL, and deleted immediately once that item finishes — whether it
succeeds or fails. Nothing is retained beyond the transcript data written to your run's own
dataset and key-value store; no audio or video is stored, logged, or reused across runs.

# Actor input Schema

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

YouTube, TikTok, Instagram, podcast, X links — or direct https media file URLs (mp3, wav, m4a, mp4, …). One transcript per URL.

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

Expected BCP-47 language tag (en, ru, ro, …). Leave empty for auto-detection.

## `timestamps` (type: `string`):

How finely to time-stamp the transcript: no timestamps, per-segment, or per-word.

## `diarize` (type: `boolean`):

Label speakers S1, S2, … (premium engines, higher per-minute rate).

## `provider` (type: `string`):

Force one exact engine instead of automatic tier routing + failover — e.g. "groq/whisper-large-v3", "groq/whisper-large-v3-turbo", "openai/whisper-1", "openai/gpt-4o-mini-transcribe", "openai/gpt-4o-transcribe-diarize", "elevenlabs/scribe\_v2", "google/chirp\_3", "google/gemini". Only engines whose provider key is configured on this actor are usable. Leave empty for automatic routing (recommended).

## `summarize` (type: `boolean`):

Add a 2-4 sentence AI summary of the transcript (billed per item).

## `translateTo` (type: `string`):

BCP-47 code to translate the transcript into (e.g. "en", "es"). Leave empty to skip (billed per item when set).

## `extractKeywords` (type: `boolean`):

Add 5-10 extracted keywords/topics from the transcript (billed per item).

## Actor input object example

```json
{
  "urls": [
    "https://download.samplelib.com/mp3/sample-15s.mp3"
  ],
  "timestamps": "segment",
  "diarize": false,
  "summarize": false,
  "extractKeywords": 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 = {
    "urls": [
        "https://download.samplelib.com/mp3/sample-15s.mp3"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("andronixmd/speech-to-text-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://download.samplelib.com/mp3/sample-15s.mp3"] }

# Run the Actor and wait for it to finish
run = client.actor("andronixmd/speech-to-text-transcriber").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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://download.samplelib.com/mp3/sample-15s.mp3"
  ]
}' |
apify call andronixmd/speech-to-text-transcriber --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=andronixmd/speech-to-text-transcriber",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Speech to Text — YouTube, TikTok, Instagram, 99+ Languages",
        "description": "Multi-engine speech-to-text for YouTube, TikTok, Instagram, podcasts, X, and direct media URLs. Auto-detects 99+ languages, routes across Groq/OpenAI/ElevenLabs/Google with automatic failover, and returns text, SRT/VTT subtitles, and optional speaker diarization. Pay-per-event — no subscription.",
        "version": "0.1",
        "x-build-id": "K7mcvtXzL3Yp2ThMQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/andronixmd~speech-to-text-transcriber/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-andronixmd-speech-to-text-transcriber",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/andronixmd~speech-to-text-transcriber/runs": {
            "post": {
                "operationId": "runs-sync-andronixmd-speech-to-text-transcriber",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/andronixmd~speech-to-text-transcriber/run-sync": {
            "post": {
                "operationId": "run-sync-andronixmd-speech-to-text-transcriber",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Audio / video URLs",
                        "type": "array",
                        "description": "YouTube, TikTok, Instagram, podcast, X links — or direct https media file URLs (mp3, wav, m4a, mp4, …). One transcript per URL.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "language": {
                        "title": "Language hint",
                        "type": "string",
                        "description": "Expected BCP-47 language tag (en, ru, ro, …). Leave empty for auto-detection."
                    },
                    "timestamps": {
                        "title": "Timestamp granularity",
                        "enum": [
                            "none",
                            "segment",
                            "word"
                        ],
                        "type": "string",
                        "description": "How finely to time-stamp the transcript: no timestamps, per-segment, or per-word.",
                        "default": "segment"
                    },
                    "diarize": {
                        "title": "Speaker diarization",
                        "type": "boolean",
                        "description": "Label speakers S1, S2, … (premium engines, higher per-minute rate).",
                        "default": false
                    },
                    "provider": {
                        "title": "Pin a specific engine (advanced)",
                        "type": "string",
                        "description": "Force one exact engine instead of automatic tier routing + failover — e.g. \"groq/whisper-large-v3\", \"groq/whisper-large-v3-turbo\", \"openai/whisper-1\", \"openai/gpt-4o-mini-transcribe\", \"openai/gpt-4o-transcribe-diarize\", \"elevenlabs/scribe_v2\", \"google/chirp_3\", \"google/gemini\". Only engines whose provider key is configured on this actor are usable. Leave empty for automatic routing (recommended)."
                    },
                    "summarize": {
                        "title": "Add: transcript summary",
                        "type": "boolean",
                        "description": "Add a 2-4 sentence AI summary of the transcript (billed per item).",
                        "default": false
                    },
                    "translateTo": {
                        "title": "Add: translate transcript",
                        "type": "string",
                        "description": "BCP-47 code to translate the transcript into (e.g. \"en\", \"es\"). Leave empty to skip (billed per item when set)."
                    },
                    "extractKeywords": {
                        "title": "Add: extract keywords",
                        "type": "boolean",
                        "description": "Add 5-10 extracted keywords/topics from the transcript (billed per item).",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
