# Speech to Text - Transcribe Audio & Video to SRT, VTT (`quietworkslab/audio-video-to-text`) Actor

Speech to text for audio and video files: transcribe MP3, MP4, WAV, MOV and more from a link, upload or key-value store to text, SRT or VTT subtitles and timestamped JSON. Silence is never sent or charged. AI billed separately in your account. $0.005 per audio minute.

- **URL**: https://apify.com/quietworkslab/audio-video-to-text.md
- **Developed by:** [Quiet Works Lab](https://apify.com/quietworkslab) (community)
- **Categories:** Videos, AI, For creators
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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

## Speech to Text - Transcribe Audio & Video to SRT, VTT

Transcribe an audio or video file from a link to text, SRT or VTT subtitles and timestamped JSON segments. Give **direct file links**, a key-value store in your Apify account or files you upload (MP3, M4A, WAV, FLAC, OGG, WEBM, MP4, MOV, MKV and more): the audio is cut at its pauses into short speech parts, an AI model writes the words of each part, and **the times come from the pauses in the audio**, not from the AI. Silence is never sent to the AI and never charged.

**Price: $0.005 per audio minute** transcribed (per started minute of each file) on the FREE tier, less with Apify Store discounts (see [Pricing](#pricing)). **The AI model is billed to your Apify account separately**, at OpenRouter's price through Apify's official OpenRouter Actor: about $0.0012 per audio minute on paid Apify plans and 10 times that on the Free plan, plus about $0.0013 per run; this Actor never adds to it. The built-in sample, files that fail and files without speech have no audio-minute charge; Apify's Actor start event ($0.00005 with the default 1 GB of memory) applies to every run.

What the built-in sample (a 9-second clip with synthetic speech, made for this Actor) gives. Its dataset row, as a run without input writes it (a few fields left out):

```json
{"status": "ok", "source": "sample", "fileName": "sample-clip.mp4", "sampleTranscript": true, "container": "mp4", "durationSec": 8.935, "transcribedSec": 8.935,
 "truncated": false, "detectedLanguage": "en", "text": "This is the built-in sample of Audio and Video to Text. It makes subtitles. One, two, three, four, five.",
 "segmentCount": 1, "segments": [{"start": 0.527, "end": 8.421, "text": "This is the built-in sample of Audio and Video to Text. It makes subtitles. One, two, three, four, five."}],
 "srtUrl": "https://api.apify.com/v2/key-value-stores/<run store>/records/001-sample-clip.srt", "parts": 1, "aiRequests": 0, "chargedEvents": 0, "errorCode": null}
```

And its SRT file (the line break between the two cues falls in the pause at 5.5-6.3 s):

```text
1
00:00:00,527 --> 00:00:05,515
This is the built-in sample of Audio
and Video to Text. It makes subtitles.

2
00:00:06,272 --> 00:00:08,421
One, two, three, four, five.
```

Click **Try for free** (free Apify account), then **Start**. Without links, a store or uploads, the Actor prepares the sample's audio with ffmpeg exactly as for your files and returns its **precomputed** transcript (`sampleTranscript: true`: no AI call, no charge), with the .txt, .srt, .vtt and .json files, within seconds.

### Typical uses

- Subtitles for your videos: SRT or WebVTT files ready to upload to a video player or platform.
- Transcripts of podcasts, interviews, meetings, lectures and voice memos, as plain text for search, notes or an LLM.
- Timestamped JSON segments for RAG, summaries with timestamps, or chapter marks.
- Transcribe the audio or video files another Actor saved in its key-value store, right after it finishes.
- Japanese recordings come out without stray spaces between Japanese characters.

Only use files you have the right to use.

### How it works

1. **Files in**: **direct links** to audio or video files (one GET per link, see [File links](#file-links)), a **key-value store** (optionally only the keys that start with a prefix), and/or **uploaded files**. They are read one at a time: the store, the uploads, then the links. The format is detected from the file's first bytes, not its name; store records that are not audio or video are skipped.
2. **Checks before any AI call**: the size (2 GB per file, and the run's free disk), an audio track, the length, and the limits: the most minutes per file and per run (`maxMinutesPerFile`, `maxMinutesPerRun`) and the minutes your maximum cost per run still pays for. A file longer than a limit is transcribed up to it (`truncated`).
3. **Audio preparation** (ffmpeg, on Apify's servers): the audio track is turned into mono 16 kHz audio, its length is the length actually decoded (not what the file's header says), the pauses are found (quieter than -35 dB for 0.4 s or more) and the loudness of every 100 ms is measured. The speech between the pauses is grouped into **parts of about 10-30 seconds**: a part ends at the first pause after 10 s, and speech without any pause is cut after 30 s at its quietest moment.
4. **Transcription**: each part (MP3, 16 kHz mono) is sent with fixed instructions to the AI model `google/gemini-3.1-flash-lite` (if OpenRouter has no endpoint for it, `google/gemini-3.5-flash-lite`) through [OpenRouter on Apify](https://apify.com/apify/openrouter), up to 4 parts at a time, using your run's own Apify token. The AI is asked for the **words only, as plain text** (no times), and to answer `NO_SPEECH` when nothing is spoken; its answer is used as it is (a code fence, quotes or a "Transcript:" label are taken off). A part that is near silence is not sent at all; text returned for a part that is mostly silence is dropped, and text far too long for the part's speech is not used (`AI_IMPLAUSIBLE_TEXT`, not charged). An answer that declines to transcribe is asked again once (its first 160 characters go to the run log, without links), and "too many requests" (HTTP 429) is retried a few times with growing pauses.
5. **Timing**: each part keeps its own start and end, from the pauses. In the SRT and VTT files a long part is split into lines; each line gets the share of the part's speech time that its share of the text has (pauses inside the part get none), and a line break near a pause moves into that pause. Each subtitle has at most two lines of about 42 characters (21 for Japanese and Chinese). Japanese lines break after 、。 or between phrases (「木工教室の / 開始時刻を」), not inside a word, and never start with 、。ー or a small kana. The text, SRT, VTT and JSON files are written to the run's key-value store and their links go into the row.
6. **Row and charge**: the row is saved, then the progress, then the file is charged. A file is never charged twice, also when Apify moves or restarts the run: each finished part is saved as it completes, so a restarted run does not send it to the AI again.

**Times come from pauses in the audio; each subtitle line is placed within its pause-to-pause segment.** The start and end of every segment are where the speech starts and stops, so they do not drift: on our 4-minute test clip of synthetic speech (56 sentences with known positions), the segment starts were 0.22 s from the real sentence starts on average and 0.33 s at most in a run on Apify (19 segments; the words had a 3.4% error rate against the script). Inside a segment of several sentences, the line times are shared out by text length, so a line can start a little early or late; check subtitles before you publish them.

### Input

| Field | What it does | Default |
|---|---|---|
| `fileUrls` | Direct links to audio or video files (not web pages), up to 100 per run | empty |
| `keyValueStoreId` | A key-value store in your account with audio or video files (store picker) | empty |
| `keyPrefix` | Only the store's keys that start with this text | empty (all) |
| `uploadedFiles` | Files uploaded in the input form | empty |
| `language` | `auto`, or an ISO 639 code of the main language (`en`, `ja`, `es`, `pt-br` ...) as a hint; never translated | `auto` |
| `vocabulary` | Names and terms to spell right, up to 500 characters (a spelling hint, never an instruction) | empty |
| `outputFormats` | Files to save: `text` (.txt), `srt`, `vtt`, `segments` (.json) | all four |
| `japaneseCleanup` | No spaces between Japanese characters; half-width katakana to full width | `true` |
| `maxMinutesPerFile` | Most minutes transcribed per file (AI cost limit) | 60 |
| `maxMinutesPerRun` | Most minutes of audio per run (AI cost limit); only the speech parts are sent | 120 on paid plans, 15 on the Free plan |

With no links, store or uploads, the built-in sample is used (no AI call, no charge). Example input for the API:

```json
{
    "fileUrls": ["https://example.com/podcast/episode-12.mp3", "https://example.com/videos/talk.mp4"],
    "language": "en",
    "vocabulary": "Quiet Works Lab, Apify",
    "outputFormats": ["srt", "segments"],
    "maxMinutesPerRun": 180
}
```

#### File links

- Use the link to the file itself (it usually ends in `.mp3`, `.m4a`, `.wav`, `.mp4` ...), not a page that plays it. A link that returns a web page or a playlist (`.m3u8`) fails with `NOT_MEDIA`. Files sent as `application/octet-stream` are fine: the first bytes decide.
- Each link is fetched once, with up to 5 redirects; private and local network addresses are refused, also after a redirect. The Actor does not log in or send cookies: a link that needs a login fails with `AUTH_REQUIRED`. Put such files in a key-value store or upload them.
- Limits per link: 2 GB and the run's free disk, 10 minutes for the download, at least 250 KB/s on average. A server error is retried twice; 429 is not retried.
- Rows and logs show links without their query string (it can hold a token).

#### Uploaded files

A file uploaded in the input form is stored in a new key-value store of your account. If your account keeps its storages private (the default), this Actor, which runs with limited permissions, may not open it: the run then names that store. Choose it in **Key-value store** and start again.

### Output

One row per file:

| Field | Meaning |
|---|---|
| `status` | `ok` (charged per started minute transcribed), `partial` (some parts failed, see `failedParts`; only the minutes transcribed are charged), `no-speech` (not charged) or `failed` (see `errorCode`, not charged) |
| `source`, `fileName`, `sourceUrl`, `linkNumber` | Where the file came from; links without their query string |
| `container`, `durationSec`, `transcribedSec` | The format found, the audio's length, the seconds transcribed (the charged basis) |
| `truncated`, `truncatedReason`, `truncatedAtSec` | Whether a limit cut the file: `maxMinutesPerFile`, `maxMinutesPerRun`, `maxCharge`, `timeout`, `aborted` or `aiError` |
| `language`, `detectedLanguage` | Your hint; `detectedLanguage` is null for transcribed files in this version (the AI gives the words only), and `en` for the built-in sample |
| `text`, `charCount`, `segmentCount`, `segments` | The transcript (one speech part per line), and the segments `[{start, end, text}]` in seconds when `segments` is chosen: one per part, from pause to pause |
| `textUrl`, `srtUrl`, `vttUrl`, `segmentsUrl` | Links to the files in the run's key-value store (keys like `001-episode-12.srt`) |
| `parts`, `failedParts`, `aiRequests` | Speech parts found at the pauses (0 for a file without speech), parts the AI could not transcribe, requests sent (retries included) |
| `chargedEvents` | audio-minute events charged for the file |
| `errorCode`, `errorMessage` | Why a file is partial, no-speech or failed, and what to do |

Error codes: `PARTS_FAILED`, `NO_SPEECH`, `NOT_MEDIA`, `NO_AUDIO`, `CORRUPT_MEDIA`, `FILE_TOO_LARGE`, `TOO_LARGE_FOR_MEMORY`, `DISK_FULL`, `TIMEOUT`, `READ_FAILED`, `TRANSCRIPTION_FAILED`, `STATE_SAVE_FAILED`, AI codes (`BAD_AI_RESPONSE`, `AI_IMPLAUSIBLE_TEXT`, `RATE_LIMITED`, `AI_UNAVAILABLE`, `AI_OUTPUT_TOO_LONG`, `AI_REFUSED`, `AI_AUTH_FAILED`, `AI_ACCOUNT_LIMIT`, `AI_FORBIDDEN`, `AI_MODEL_UNAVAILABLE`, `AI_REQUEST_REFUSED`) and, for links, `NOT_FOUND`, `AUTH_REQUIRED`, `RATE_LIMITED`, `HTTP_ERROR`, `BLOCKED_ADDRESS`, `BLOCKED_URL`, `DNS_FAILED`, `DOWNLOAD_FAILED`, `SLOW_DOWNLOAD`, `TOO_MANY_REDIRECTS`.

The run's key-value store also holds two small records of the run's own: `AI-SENT` (the audio sent to the AI so far, written before every request) and, while a file is in work, `PARTS-…` (its finished parts, saved every few parts and removed when the file is done). It has the summary in `OUTPUT`: status (`COMPLETE`, `PARTIAL`, `FAILED`), counts, minutes transcribed, `chargedEvents`, and `aiUsage` (requests, audio seconds sent, tokens, and the AI cost as OpenRouter reports it). It is written at the start and after every file, so it also exists when a run is stopped.

### Run it after another Actor

If another Actor saves audio or video files in its key-value store, add this Actor in that Actor's **Integrations** tab and set the input field to the other run's store:

```json
{ "keyValueStoreId": "{{resource.defaultKeyValueStoreId}}", "outputFormats": ["srt"] }
```

### Pricing

The prices are on the **Pricing** tab of this Actor. There are two separate costs.

**1. This Actor (pay-per-event):**

| Event | When | FREE | BRONZE | SILVER | GOLD and above |
|---|---|---|---|---|---|
| `audio-minute` | Per started minute of audio transcribed, per file | $0.005 | $0.0045 | $0.004 | $0.0035 |
| Per 1,000 events (about 16.7 hours) | | $5.00 | $4.50 | $4.00 | $3.50 |
| `apify-actor-start` (Apify) | Every run, also the sample: once per GB of memory (the default 1 GB = once) | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

The tier comes from your Apify plan, and your own price is shown on the Pricing tab. The start event has no tiers. Examples at the FREE price: a 30-second file $0.005, a 61-second file $0.01, a 10-minute file $0.05, a 1-hour file $0.30.

**2. The AI model (billed by Apify's OpenRouter Actor, not by this Actor):** the audio is transcribed by `google/gemini-3.1-flash-lite` (if OpenRouter has no endpoint for it, `google/gemini-3.5-flash-lite`) through [apify/openrouter](https://apify.com/apify/openrouter), which charges **your own Apify account** at OpenRouter's price, in its own run. This Actor does not add anything to that cost and does not receive any of it.

- About **$0.0012 per audio minute** on paid Apify plans (audio is about 1,500 tokens per minute at $0.50 per million, plus the instructions and the text written at $1.50 per million output tokens; measured $0.00124 per minute on our test clips); each request is rounded up to $0.00001.
- **On the Apify Free plan the AI price is 10 times higher**: about $0.012 per audio minute. That is why a run on the Free plan sends at most 15 minutes of audio unless you set `maxMinutesPerRun`.
- Each run also starts one OpenRouter run: about $0.0013 on paid plans (about $0.0023 on the Free plan).
- Only speech is sent: parts that are near silence are not sent, so silence costs no AI. Each request also carries the short fixed instructions (about 10% more AI cost on top of the audio for parts of 10-30 s).
- Retries send a part again and cost again: an unreadable answer is asked once more; a 429, a server error or a timeout is retried. `maxMinutesPerRun` counts each part once; on top of that, **every request (retries included) is counted before it is sent, and a run never sends more than twice `maxMinutesPerRun` of audio in total**, also over a restart: at that point it stops with status `PARTIAL`.
- `OUTPUT.aiUsage.costUsd` shows the AI cost of the run as OpenRouter reports it (paid-plan price).

Example, a 10-minute file on a paid plan: $0.05 for this Actor plus about $0.012 + $0.0013 for the AI, about **$0.065** in all.

- **What is charged**: each file's started minutes, silences inside it included (a 10-minute file with speech is 10 minutes), except the time of parts the AI could not transcribe. **Not charged by this Actor**: the built-in sample, failed files, files without speech (`no-speech`, also when the AI hears nothing), and parts the AI could not transcribe. **The AI cost of a file that fails after the AI step may still be charged by OpenRouter.**
- **Your maximum cost per run limits this Actor's charge only**, not the AI model's run. A file longer than what it still pays for is transcribed up to that point; the run then stops with status `PARTIAL` and keeps the rows so far. The AI cost is limited by `maxMinutesPerFile` and `maxMinutesPerRun`.
- **No double charges**: each file is charged right after its row is saved. If Apify moves or restarts the run, it goes on after the last saved file, and the parts of the file in work that were already transcribed are used as they are: only the parts in progress at that moment are sent to the AI again. A restarted run that cannot read its saved progress stops without charging or calling the AI and keeps that progress for a resurrected run.

### Limits

Measured locally (a Windows PC, with the AI mocked): a run without input (the sample) takes about 2 seconds; preparing a 1-hour MP3 (128 kbit/s, 58 MB) takes about 4 seconds and measuring its loudness about 2 seconds more. A 4-minute clip of speech gives about 19 parts (one AI request each; 4 run at a time). Not measured on Apify yet: the AI's time per part (the parts of a file go 3 at a time) and the preparation time with 1 GB of memory (a quarter of a CPU core).

- 2 GB per file and the run's free disk (twice its memory); 100 links per run; 600 minutes per file and 3,000 per run at most.
- ffmpeg may use at most half of the run's memory: a file that needs more fails with `TOO_LARGE_FOR_MEMORY` before anything is sent to the AI (not charged). Files whose length is not stored (for example some browser recordings) are measured from their packets, for at most 60 seconds.
- The AI writes at most 2,048 tokens per answer, far more than 30 seconds of speech; an answer cut at that limit (a model repeating itself) fails that part (`AI_OUTPUT_TOO_LONG`, not charged).
- **Times come from pauses in the audio**: each segment from pause to pause, its lines placed by text length inside it. Speech with no pause for 30 seconds is cut at its quietest moment, where a word can be split between two parts. Pauses are found by loudness, so loud background noise or music can hide them (then parts are cut at 30 seconds).
- No speaker labels (who said what). Silence gives `no-speech` (not sent to the AI, not charged). Music or loud noise is sent like speech; the AI is told to answer nothing for it, but it can rarely invent text there.
- Files with one main language give the most reliable results; mixed-language speech is transcribed as heard.
- A run stops 30 seconds before its timeout and keeps what was transcribed (`truncated: timeout`); give long files more time (Run options > Timeout).

### Privacy

- Files are processed inside the run: the audio of each part is sent to the AI model through Apify's OpenRouter Actor, together with fixed instructions and your language and vocabulary hints, and nothing else (no file names, links or other data). The transcripts are written only to the run's dataset and key-value store.
- This Actor reads only the stores you choose (limited permissions). Links appear in rows and logs without their query string; `OUTPUT` keeps a short unsalted hash of the list of links, not the list, and the vocabulary's length, not the text.

### FAQ

**How accurate are the timestamps of Audio & Video to Text?** Segment times come from the pauses in the audio, not from the AI, so they do not drift over a long file: on our 4-minute synthetic test clip the segment starts were 0.22 s from the real sentence starts on average and 0.33 s at most (a run on Apify), and the words had a 3.4% error rate. Inside a segment, subtitle lines are placed by text length, so they are close but not word-exact.

**Does Audio & Video to Text charge for silence?** A file with no speech is not charged and nothing of it is sent to the AI. In a file with speech, the minutes are counted over the whole file (pauses included), but silent stretches are never sent to the AI, so they cost no AI.

**Why is the AI cost separate from the price of Audio & Video to Text?** The AI model runs in your own Apify account through Apify's official OpenRouter Actor, which charges you OpenRouter's price directly. This Actor charges only for its own work (preparing and cutting the audio, merging, the subtitle files) and never marks up the AI cost.

**Does Audio & Video to Text translate?** No. The transcript is in the language that is spoken. `language` is only a hint for recognition.

**What happens with a 3-hour recording?** It is cut at its pauses into several hundred parts of 10-30 seconds (4 are transcribed at a time) and put together in order. Set `maxMinutesPerFile` to 180 or more (the default is 60) and `maxMinutesPerRun` to cover it, and give the run enough time.

**Are files stored?** No. They are processed inside the run; only the transcripts go into the run's storages.

### More from Quiet Works Lab

- [Dataset Diff - Only New & Changed Items Since Last Run](https://apify.com/quietworkslab/dataset-change-tracker): get only the new and changed items since your scraper's last run, or compare two datasets.
- [Image Converter & Compressor - WebP, AVIF, strip EXIF/GPS](https://apify.com/quietworkslab/image-converter): convert and compress images and remove EXIF, GPS and other metadata.
- [Japanese Text Normalizer & RAG Chunker](https://apify.com/quietworkslab/japanese-text-normalizer): clean Japanese text before an LLM or RAG and split it into sentence-aware chunks.
- [Merge, Deduplicate & Join Datasets](https://apify.com/quietworkslab/merge-dedup-datasets): merge your datasets, remove duplicates by key and join fields from a lookup dataset.
- [Video Frame Extractor - Thumbnails, Scenes & Contact Sheet](https://apify.com/quietworkslab/video-frame-extractor): extract thumbnails and frames from your videos, with a contact sheet per video.
- [PDF Text Extractor - PDF & Word, Japanese-Ready](https://apify.com/quietworkslab/pdf-text-extractor): extract clean text from PDF and Word files, with headers and page numbers removed.

### Support

Report a problem in the **Issues** tab: the input you used (without private links) and the run ID help most.

This Actor is developed and maintained with the help of AI (Claude Code). Issues are answered within a few days.

The built-in sample's speech is synthesized with the open-source Flite speech engine (BSD-style license); the sample and its text were made for this Actor.

### 日本語の概要

音声・動画ファイル（直接のリンク、Apify のキー・バリュー・ストア、アップロード）を文字起こしし、テキスト・SRT・VTT 字幕・時刻つき JSON を作ります。音声は無音のところで10〜30秒ほどの部分に分け、AI（Apify 公式の OpenRouter Actor 経由の google/gemini-3.1-flash-lite）で文字にします。**時刻は AI ではなく音声の無音の位置から決める**ので、長い録音でもずれません（字幕の行は、部分の中で文字数に応じて置きます）。無音は AI に送らず、課金もしません。料金はこの Actor が音声1分（ファイルごとに始まった分）あたり $0.005（FREE の価格）。**AI の代金は別に、あなたの Apify の口座に OpenRouter の価格で付きます**（有料プランで1分 約 $0.0012、無料プランはその10倍）。日本語は文字の間や、数字と文字の間に余計な空白を入れません。字幕の改行は句読点の後か文節の切れ目に置き、言葉の途中では切りません（「、」「。」「ー」「っ」などで行を始めません）。

# Changelog

This Actor's version history is a separate document: https://apify.com/quietworkslab/audio-video-to-text/changelog.md

# Actor input Schema

## `fileUrls` (type: `array`):

Direct links to audio or video files (MP3, M4A, WAV, FLAC, OGG, OPUS, WEBM, MP4, MOV, MKV and more) that you have the right to use, one per line. Not web pages or streaming sites: the link must return the file itself. Up to 100 links per run, each downloaded once (up to 2 GB and the run's free disk, within 10 minutes). Links that need a login, and private or local network addresses, are refused; a link that fails is not charged. Leave empty (with no store and no uploads) to try the built-in sample.

## `keyValueStoreId` (type: `string`):

Optional. A key-value store in your account that holds audio or video files. Every record that is audio or video is transcribed; JSON, images and other records are skipped. When this Actor runs after another Actor from its Integrations tab, set it to {{resource.defaultKeyValueStoreId}}. Uploaded files that are in this store are read with it, once.

## `keyPrefix` (type: `string`):

Optional. Read only the records of the key-value store whose key starts with this text, for example meeting- or 2026-11-. Empty = all records.

## `uploadedFiles` (type: `array`):

Optional. Upload audio or video files here. This field takes only files stored in your Apify account; put links to files on other websites into "File links". If your account keeps its storages private (the default), this Actor, which runs with limited permissions, may not open the uploads: the run then names the store they are in. Choose that store in "Key-value store" and start again.

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

auto (default): the AI hears which language is spoken. Or an ISO 639 code of the main language, for example en, ja, es, de, fr, pt-br, as a hint. The transcript is always in the spoken language (never translated).

## `vocabulary` (type: `string`):

Optional, up to 500 characters. Names, brands and jargon the speakers use, so the AI spells them right, for example: Quiet Works Lab, Apify, SRT, Kubernetes. It is sent to the AI with each part of the audio as a spelling hint only, never as an instruction.

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

Which files to save in the run's key-value store for each transcribed file (their links are in the dataset row). Default: all four. The dataset row always has the text; it has the segments too when "Timestamped JSON segments" is chosen.

## `japaneseCleanup` (type: `boolean`):

Checked (default): no spaces between Japanese characters or next to Japanese punctuation, half-width katakana to full width (the same spacing rules as Japanese Text Normalizer by Quiet Works Lab). Text in other languages is not changed.

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

The AI model is billed to your Apify account separately (see Pricing), and the maximum cost per run you set does not limit it. A longer file is transcribed up to this point and its row says truncated. Default 60, up to 600.

## `maxMinutesPerRun` (type: `integer`):

Most minutes of audio in one run, over all files (only the speech parts are sent to the AI, so it hears at most this much). When it is reached, the file in work is cut there and the run stops (PARTIAL). Empty = 120 minutes on a paid Apify plan, 15 minutes on the Free plan (where the AI price is 10 times higher). Retries are counted too, against a hard limit of twice this amount that is never passed.

## Actor input object example

```json
{
  "language": "auto",
  "outputFormats": [
    "text",
    "srt",
    "vtt",
    "segments"
  ],
  "japaneseCleanup": true,
  "maxMinutesPerFile": 60
}
```

# Actor output Schema

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

One row per file: status, length, transcript text, links to its .txt, .srt, .vtt and .json files, and the audio-minute events charged.

## `files` (type: `string`):

List of the records in the run's key-value store: for each file, for example 001-episode-12.txt, 001-episode-12.srt, 001-episode-12.vtt and 001-episode-12.json, and OUTPUT.

## `summary` (type: `string`):

Status, settings, counts, minutes transcribed, events charged and the AI usage (requests, tokens and the cost at OpenRouter's price) of the run (record OUTPUT). It is written at the start and after every file, so it also exists when a run is stopped (status RUNNING).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("quietworkslab/audio-video-to-text").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("quietworkslab/audio-video-to-text").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 '{}' |
apify call quietworkslab/audio-video-to-text --silent --output-dataset

```

## MCP server setup

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

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/MB9yM7OaUQWVu17h9/builds/NI8aOKAq1NMXTIoSe/openapi.json
