> ## Documentation Index
> Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch Audio Transcription

> Transcribe audio and video files at scale using the Runcrate Whisper API. Python, TypeScript, and curl examples.

export const RuncrateStyles = () => {
  if (typeof document !== 'undefined' && !document.getElementById('runcrate-overrides')) {
    const s = document.createElement('style');
    s.id = 'runcrate-overrides';
    s.textContent = `
      /* Match Runcrate's rounding scale (--radius: 0.75rem) */
      .rounded-sm { border-radius: 0.5rem !important; }   /* 8px */
      .rounded-md { border-radius: 0.625rem !important; } /* 10px */
      .rounded-lg { border-radius: 0.75rem !important; }  /* 12px */
      .rounded-l-sm { border-top-left-radius: 0.5rem !important; border-bottom-left-radius: 0.5rem !important; }
      .rounded-r-sm { border-top-right-radius: 0.5rem !important; border-bottom-right-radius: 0.5rem !important; }
      .rounded-l-md { border-top-left-radius: 0.625rem !important; border-bottom-left-radius: 0.625rem !important; }
      .rounded-r-md { border-top-right-radius: 0.625rem !important; border-bottom-right-radius: 0.625rem !important; }
      .rounded-l-lg { border-top-left-radius: 0.75rem !important; border-bottom-left-radius: 0.75rem !important; }
      .rounded-r-lg { border-top-right-radius: 0.75rem !important; border-bottom-right-radius: 0.75rem !important; }

      /* Cards: never pure white in light mode */
      .card { background-color: #fcfcfc !important; border-radius: 0.75rem !important; }
      html.dark .card { background-color: #141414 !important; }

      /* Docs hero box */
      .rc-hero { background-color: #fcfcfc; border: 1px solid #e0e0e0; }
      html.dark .rc-hero { background-color: #141414; border-color: #242424; }
      html.dark .rc-hero h1 { color: #f5f5f5; }

      /* Runcrate scrollbar — thin, transparent track, hide-until-hover thumb */
      ::-webkit-scrollbar { width: 6px; height: 6px; background-color: transparent; }
      ::-webkit-scrollbar-track { background-color: transparent; }
      ::-webkit-scrollbar-thumb { background-color: rgba(155, 155, 155, 0.5); border-radius: 10px; transition: opacity 0.3s ease; opacity: 0; }
      ::-webkit-scrollbar-thumb:hover { background-color: rgba(155, 155, 155, 0.7); }
      *:hover::-webkit-scrollbar-thumb,
      *:focus::-webkit-scrollbar-thumb,
      *:active::-webkit-scrollbar-thumb { opacity: 1; }
      * { scrollbar-width: thin; scrollbar-color: rgba(155, 155, 155, 0.5) transparent; }
    `;
    document.head.appendChild(s);
  }
  return null;
};

<RuncrateStyles />

Transcribe meetings, podcasts, interviews, and customer calls at scale using the Runcrate Whisper API. This guide covers single-file transcription, batch processing across a folder, and output format options.

## What you'll build

A pipeline that transcribes multiple audio files using Whisper large-v3 through the Runcrate API. The pipeline reads a folder of recordings, transcribes each one, and writes the results as plain text, SRT subtitles, or structured JSON — your choice.

***

## Single file transcription

<CodeGroup>
  ```bash curl theme={"theme":"github-dark"}
  curl https://api.runcrate.ai/v1/audio/transcriptions \
    -H "Authorization: Bearer rc_live_YOUR_API_KEY" \
    -F model="openai/whisper-large-v3" \
    -F file=@meeting-2025-05-19.mp3
  ```

  ```python Python (OpenAI SDK) theme={"theme":"github-dark"}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.runcrate.ai/v1",
      api_key="rc_live_YOUR_API_KEY",
  )

  transcript = client.audio.transcriptions.create(
      model="openai/whisper-large-v3",
      file=open("meeting-2025-05-19.mp3", "rb"),
  )
  print(transcript.text)
  ```

  ```typescript TypeScript (OpenAI SDK) theme={"theme":"github-dark"}
  import OpenAI from "openai";
  import fs from "fs";

  const client = new OpenAI({
    baseURL: "https://api.runcrate.ai/v1",
    apiKey: "rc_live_YOUR_API_KEY",
  });

  const transcript = await client.audio.transcriptions.create({
    model: "openai/whisper-large-v3",
    file: fs.createReadStream("meeting-2025-05-19.mp3"),
  });
  console.log(transcript.text);
  ```

  ```python Python (Runcrate SDK) theme={"theme":"github-dark"}
  from runcrate import Runcrate

  client = Runcrate(api_key="rc_live_YOUR_API_KEY")

  with open("meeting-2025-05-19.mp3", "rb") as f:
      result = client.models.transcribe(
          model="openai/whisper-large-v3",
          file=f,
          filename="meeting-2025-05-19.mp3",
      )

  print(result.text)
  ```
</CodeGroup>

***

## Batch processing

Transcribe every audio file in a folder and write the results to disk. This example uses the Runcrate Python SDK and outputs SRT subtitle files.

```python theme={"theme":"github-dark"}
import os
from pathlib import Path
from runcrate import Runcrate

client = Runcrate(api_key="rc_live_YOUR_API_KEY")

audio_dir = Path("./recordings")
output_dir = Path("./transcripts")
output_dir.mkdir(exist_ok=True)

SUPPORTED = {".mp3", ".wav", ".m4a", ".flac", ".ogg", ".webm"}

for audio_file in sorted(audio_dir.iterdir()):
    if audio_file.suffix.lower() not in SUPPORTED:
        continue

    with open(audio_file, "rb") as f:
        result = client.models.transcribe(
            model="openai/whisper-large-v3",
            file=f,
            filename=audio_file.name,
            response_format="srt",
        )

    srt_path = output_dir / f"{audio_file.stem}.srt"
    srt_path.write_text(result.text)
    print(f"Transcribed: {audio_file.name} → {srt_path.name}")
```

### Batch processing with the OpenAI SDK

The same pattern works with the OpenAI Python SDK pointed at the Runcrate API:

```python theme={"theme":"github-dark"}
import os
from pathlib import Path
from openai import OpenAI

client = OpenAI(
    base_url="https://api.runcrate.ai/v1",
    api_key="rc_live_YOUR_API_KEY",
)

audio_dir = Path("./recordings")
output_dir = Path("./transcripts")
output_dir.mkdir(exist_ok=True)

for audio_file in sorted(audio_dir.glob("*.mp3")):
    transcript = client.audio.transcriptions.create(
        model="openai/whisper-large-v3",
        file=open(audio_file, "rb"),
    )

    txt_path = output_dir / f"{audio_file.stem}.txt"
    txt_path.write_text(transcript.text)
    print(f"Transcribed: {audio_file.name} → {txt_path.name}")
```

***

## Output formats

| Format | Extension | Use case                                                       |
| ------ | --------- | -------------------------------------------------------------- |
| `text` | `.txt`    | Plain transcript — search, summarization, RAG ingestion        |
| `json` | `.json`   | Structured output with word-level timestamps                   |
| `srt`  | `.srt`    | Subtitle file for video editors (Premiere, DaVinci, Final Cut) |
| `vtt`  | `.vtt`    | Web video subtitles (HTML5 `<track>` element)                  |

Pass the format via the `response_format` parameter:

```python theme={"theme":"github-dark"}
result = client.models.transcribe(
    model="openai/whisper-large-v3",
    file=f,
    filename="episode-42.mp3",
    response_format="srt",  # or "text", "json", "vtt"
)
```

***

## Language hints

Whisper auto-detects the spoken language, but you can improve accuracy on non-English audio by passing a language hint:

```python theme={"theme":"github-dark"}
result = client.models.transcribe(
    model="openai/whisper-large-v3",
    file=f,
    filename="interview-tokyo.mp3",
    language="ja",  # ISO 639-1 code
)
```

***

## Use cases

* **Meeting recordings** — transcribe and feed into an LLM for searchable notes and action items.
* **Podcast episodes** — generate full transcripts for show notes, blog posts, and SEO.
* **Customer support calls** — bulk-transcribe for quality analysis and compliance review.
* **Lecture recordings** — produce study materials and make content accessible.
* **Video content** — generate SRT/VTT subtitle files for automatic captioning.

***

## Tips

* **Supported formats.** MP3, WAV, M4A, FLAC, OGG, and WebM.
* **Large files.** For recordings longer than \~2 hours, split into chunks before uploading. Tools like `ffmpeg` make this easy: `ffmpeg -i long-meeting.mp3 -f segment -segment_time 1800 -c copy chunk_%03d.mp3`.
* **SRT for video editing.** SRT is the most widely supported subtitle format across video editors and media players. Use VTT only if you need web-native `<track>` elements.
* **Combine with chat models.** Pipe transcripts into a Runcrate chat model for summarization, action-item extraction, or translation — see the [RAG Pipeline](/examples/rag-pipeline) guide for the pattern.
