---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://framesfield.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
title: "Whisper Transcription and ASS Caption Skill"
description: "Installable SKILL.md teaching Claude Code, Cursor, and Codex how to transcribe dialogue or voiceovers with OpenAI Whisper / `gpt-4o-transcribe`, enforce a strict 3–4 word vertical cue limit, correct brand acronyms, and emit cross-platform TikTok/Reels/Shorts safe-zone `.ass` subtitle scripts."
canonical: "https://framesfield.com/skills/whisper-srt-and-ass-caption-pipeline-skill"
---

# Whisper Transcription and ASS Caption Skill

> Installable SKILL.md teaching Claude Code, Cursor, and Codex how to transcribe dialogue or voiceovers with OpenAI Whisper / `gpt-4o-transcribe`, enforce a strict 3–4 word vertical cue limit, correct brand acronyms, and emit cross-platform TikTok/Reels/Shorts safe-zone `.ass` subtitle scripts.

- **Canonical URL:** https://framesfield.com/skills/whisper-srt-and-ass-caption-pipeline-skill
- **Raw Payload URL:** https://framesfield.com/raw/skills/whisper-srt-and-ass-caption-pipeline-skill
- **Asset Type:** SKILL.md
- **Compatible Hosts:** Claude Code, Cursor, Codex
- **Target Creative Tool:** OpenAI Audio API / whisper.cpp
- **License:** MIT
- **Last Verified:** 2026-11-30
- **Source Reference:** https://platform.openai.com/docs/guides/speech-to-text

## Setup & Install

```bash
mkdir -p .claude/skills/whisper-ass-captions
curl -fsSL https://framesfield.com/raw/skills/whisper-srt-and-ass-caption-pipeline-skill -o .claude/skills/whisper-ass-captions/SKILL.md

```

## Copyable Asset (SKILL.md)

````markdown
---
name: whisper-ass-captions
description: Extract clean 16kHz mono speech from video renders, transcribe word-level timestamps with OpenAI Whisper API or local whisper.cpp, correct proper nouns and technical terms, wrap strictly to 3-4 words per cue, and emit TikTok/Reels/Shorts safe-zone ASS subtitle files.
---

# Whisper Word-Timed Transcription & Safe-Zone ASS Caption Protocol

Whenever generating captions for short-form or long-form AI videos, follow these exact five stages:

## 1. Extract Lightweight 16 kHz Mono Speech Stem
Never upload multi-hundred-megabyte MP4 files to transcription APIs—extract clean 16 kHz mono WAV first:
```bash
ffmpeg -y -i master.mp4 -vn -ac 1 -ar 16000 -c:a pcm_s16le /tmp/speech_16k.wav
```

## 2. Transcribe with Word-Level Timestamps + Domain Glossary Prompt
Pass brand names and technical acronyms inside the Whisper `prompt` hint so proper nouns spell accurately on the first pass:
```bash
curl -sS https://api.openai.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -F file="@/tmp/speech_16k.wav" \
  -F model="whisper-1" \
  -F response_format="verbose_json" \
  -F "timestamp_granularities[]=word" \
  -F prompt="FramesField, Gemini Omni Flash, Kling, FLUX 3, ComfyUI, Wan 2.2, LTX-2, LUFS, Recraft, FFmpeg" \
  > transcript_words.json
```
*(If the user prefers offline local execution, run `whisper-cli -m ggml-medium.en.bin -f /tmp/speech_16k.wav -ojf` via `whisper.cpp`.)*

## 3. Rhythmic Cue Grouping (Never Dump 10-Word Paragraphs)
Convert `words[]` into subtitle cues following strict mobile readability rules:
- **Vertical 9:16:** Maximum **3 to 4 words** (or `<= 22` characters) per cue; break immediately on sentence punctuation (`.`, `?`, `!`) or pauses `> 0.35s`.
- **Landscape 16:9:** Maximum **7 to 9 words** per cue (1–2 balanced lines).
- Always clamp cue end times cleanly so consecutive cues never overlap (`end[i] <= start[i+1]`).

## 4. Emit Safe-Zone `.ass` Header (`PlayResX=1080`, `PlayResY=1920`)
```ini
[Script Info]
ScriptType: v4.00+
PlayResX: 1080
PlayResY: 1920
WrapStyle: 2

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: VerticalSafe,Arial,62,&H00FFFFFF,&H002044E0,&H00111111,&H80000000,-1,0,0,0,100,100,0,0,1,3,1,2,80,170,520,1
```

## 5. Mandatory Spelling Audit Before Burning
Print the complete list of generated caption cues to stdout so the user can proofread every product name, URL, and dollar figure BEFORE burning captions permanently into pixels (see `ffmpeg-vertical-delivery`).
````

## Example Input

```text
"Transcribe exports/reel_01.mp4 into a 9:16 safe-zone captions.ass file with 3-word max phrasing and accurate spelling for 'Gemini Omni Flash' and '-14 LUFS'."
```

## Expected Output

```text
- Extracts `/tmp/speech_16k.wav` via FFmpeg, calls Whisper `verbose_json` with word timestamps + custom glossary prompt.
- Groups words into rhythmic 3–4 word cues breaking on pauses >0.35s and prints every line for quick verification.
- Writes valid `captions.ass` targeting `PlayResX=1080, PlayResY=1920, MarginL=80, MarginR=170, MarginV=520`.
```

## Requirements

- FFmpeg for 16 kHz audio extraction + either `OPENAI_API_KEY` (`whisper-1` costs $0.006/min) OR local `whisper.cpp`
- Claude Code, Cursor, or Codex

## Known Limits

- Heavy background music degrades word timestamp precision—always run transcription against your clean dry voiceover WAV before mixing music whenever possible
- Keep `OPENAI_API_KEY` inside local environment variables; never commit keys to source files

## Implementation Notes

## Pair with Safe-Zone Vertical Rendering

Feed the generated `captions.ass` straight into [Skill 08: FFmpeg 9:16 Safe-Zone Crop, Subtitle Burn & Audio Ducking Skill](/skills/ffmpeg-vertical-captions-and-ducking) and read the full pixel coordinate geometry in [Guide 07: Vertical AI Video Systems](/guides/short-form-ai-video-production-system).
