Skip to content
Coding Script or NotebookGoogle ColabFree

Whisper API Transcription Notebook: Bulk Audio, Long Files and SRT Captions

ForVideo and visualContent analysis

By Lazarina Stoy· Updated 5 Dec 2026

Podcasts, interviews, webinars and videos are full of material you could turn into posts, captions or research notes, once they are text. This free Google Colab notebook transcribes audio with OpenAI’s Whisper API: one file, several files in bulk, files over the API’s 25 MB upload limit, and SRT captions with correct timestamps.

Who it’s for

Content marketers, SEOs and video teams repurposing spoken content, and anyone who followed the original 2024 tutorial and hit errors from the old OpenAI SDK. Transcripts are also a starting point for show notes, quotes for social posts and the raw text for topic or entity analysis. You need an OpenAI API key on an account with credits.

How to use it

  1. Open the notebook in Colab, add your key as a Colab secret named OPENAI_API_KEY and switch on notebook access.
  2. Upload one audio or video file and print its transcript. Check a few names and terms against the recording before you go further.
  3. For files over 25 MB, run the chunking helper, which splits the audio into 10-minute pieces with pydub and transcribes them in order.
  4. Generate an .srt captions file from the segment timestamps.
  5. Use the bulk cell to upload several files and download one .txt per file.

What you get

  • Plain-text transcripts saved as UTF-8, so non-English text saves correctly
  • SRT captions with timestamps corrected across chunks
  • A command-line script for any number of files, with automatic chunking
  • Notes on the newer gpt-4o-transcribe models, which return text or JSON only, so SRT captions need whisper-1

What changed in the 2026 refresh

The original notebook mixed the retired openai.api_key pattern with the new client and failed with a NameError. The refresh uses the current SDK, reads the key from a secret instead of the notebook, returns the transcript text, and gives a clear message for files over 25 MB.

Limits and privacy

You pay OpenAI for every transcription, so try a short file first. Audio is uploaded to OpenAI, so don’t send recordings with confidential or personal information unless your agreement covers it. Automatic transcripts need a human check for names, brand terms and jargon before you publish them. The chunking and SRT logic was tested on generated audio, with the API mocked.

Follow the walkthrough in How to transcribe audio with OpenAI’s Whisper API in Google Colab (Python). Content transformation with machine learning, turning one format into another, is a module of Introduction to Machine Learning for SEO.

What’s included

  • Transcribe one file or many, with one .txt per file
  • Files over 25 MB split into 10-minute chunks with pydub and transcribed in order
  • SRT captions from segment timestamps, corrected across chunks
  • Current OpenAI SDK, key read from a Colab secret
  • Command-line version and offline tests included