Skip to content
FramesField
SKILL.md Beginner Setup (1 Command) SKILL.md
Verified Dec 1, 2026

ElevenLabs Scribe v2 STT to Synced SRT & 9:16 ASS Captions Skill

How to install this SKILL.md

Drop into .claude/skills/, .cursor/skills/, or .agents/skills/ to turn finished podcasts, YouTube edits, and vertical Reels into synced, properly spelled captions in one command.

Executable SKILL.md playbook teaching Claude Code, Cursor, and Codex how to extract timeline-aligned 16 kHz mono WAV audio, pin ElevenLabs Scribe v2 on fal.ai ($0.008/min · $0.0104/min w/ custom brand keyterms and speaker diarization), and deterministically emit 38-char YouTube SRTs plus 3-word active-highlight 9:16 Reels ASS captions.

Compatible agent hosts
Claude Code Cursor Codex
Target tool: fal.ai API / ElevenLabs Scribe v2 / Python / FFmpeg · License: MIT
  1. STEP 01
    Install pure SKILL.md from /raw/skills/

    Copy the Claude Code, Cursor, or Codex curl command below into your project root.

  2. STEP 02
    Pass your CFR video + optional brand keyterms

    Agent extracts timeline-zero 16 kHz WAV and prints exact Scribe v2 spend ($0.008/min base or $0.0104/min w/ keyterms) before calling fal.ai.

  3. STEP 03
    Emit synced 38-char SRT & 9:16 karaoke ASS

    Automatically splits cues on speaker_id turns and safe-zone MarginV=500, then soft-muxes SRT or burns ASS captions via FFmpeg.

1. Install for your tool

Pick the app you use below for the exact verified command or config—zero manual guessing.

Direct raw file (SKILL.md) ↓
Claude Code bash
Installs pure SKILL.md bytes directly into Claude Code:
mkdir -p .claude/skills/elevenlabs-scribe-captions
curl -fsSL https://framesfield.com/raw/skills/elevenlabs-scribe-stt-to-srt-and-ass-captions-skill \
  -o .claude/skills/elevenlabs-scribe-captions/SKILL.md

2. Inspect or download the full SKILL.md file

This is the exact raw file served at /raw/skills/elevenlabs-scribe-stt-to-srt-and-ass-captions-skill.

ElevenLabs Scribe v2 STT to Synced SRT & 9:16 ASS Captions Skill SKILL.md
---
name: elevenlabs-scribe-captions
description: Automate speech-to-text captioning with ElevenLabs Scribe v2 on fal.ai (fal-ai/elevenlabs/speech-to-text/scribe-v2 at $0.008/min, or $0.0104/min with custom keyterms), including timeline-zero 16 kHz mono WAV extraction, speaker_id diarization, deterministic <=38-char YouTube SRT wrapping, and 3-word active-highlight 9:16 Reels ASS burn-in. Use when generating synced video subtitles, podcast transcripts, or chapter clips.
---

# ElevenLabs Scribe v2 STT -> Synced SRT & 9:16 ASS Captions Skill

## 1. Mandatory Endpoint & Billing Rules
- **ALWAYS pin `fal-ai/elevenlabs/speech-to-text/scribe-v2`:** Base rate is **`$0.008` / input audio minute** (`$0.48/hour`), or **`$0.0104/min`** (`+30%`) when passing domain `keyterms`. Never hit the root legacy `/speech-to-text` path (`$0.03/min`, 3.75x more expensive).
- Measure exact audio duration via `ffprobe` and print estimated USD spend before calling the API.

## 2. Step 1 — Timeline-Zero 16 kHz Mono WAV Extraction
Eliminate MP4 edit-list sync drift before ASR:
```bash
ffmpeg -y -i master_cfr.mp4 -vn -ac 1 -ar 16000 -af "aresample=async=1:first_pts=0" audio_16k.wav
```

## 3. Step 2 — Call Scribe v2 With Diarization & Brand Keyterms
Upload `audio_16k.wav` (or pass a signed URL) and request word-level JSON:
```bash
curl -sS -X POST "https://fal.run/fal-ai/elevenlabs/speech-to-text/scribe-v2" \
  -H "Authorization: Key $FAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio_url": "'"$AUDIO_URL"'",
    "diarize": true,
    "tag_audio_events": false,
    "keyterms": ["FramesField", "SeedVR2", "FASHN", "ComfyUI", "Remotion"]
  }' > scribe.json
```
- Set `tag_audio_events: false` for clean social burn-in captions; set `true` for accessible YouTube SDH tracks.

## 4. Step 3 — Deterministic SRT (<=38 Chars) + 9:16 ASS (MarginV=500)
Filter `words` to `w["type"] == "word"`:
- **YouTube SRT:** Flush a cue whenever `speaker_id` changes, pause gap `> 0.65s`, line length `> 38 chars`, or cue duration `> 3.2s`.
- **9:16 Reels ASS (`PlayResX: 1080`, `PlayResY: 1920`):** Group `<=3` words per chunk (breaking on `speaker_id` flip or `>0.55s` pause), set `Alignment=2, MarginV=500` inside the safe middle third, and emit per-word active highlight color (`{\c&H002044E0&}` in BGR hex).

## 5. Step 4 — Mux Soft Subs or Burn ASS Captions
- **Universal soft-sub MP4 (works on all FFmpeg builds):**
  ```bash
  ffmpeg -y -i master_cfr.mp4 -i out.srt -c:v copy -c:a copy -c:s mov_text captioned_soft.mp4
  ```
- **Hard-burn 9:16 ASS (requires FFmpeg compiled with `libass`; on macOS use `ffmpeg-full`):**
  ```bash
  ffmpeg -y -i vertical_916.mp4 -vf "ass=out.ass" -c:v libx264 -crf 18 -pix_fmt yuv420p -c:a copy -movflags +faststart vertical_burned.mp4
  ```
- **Verification Gate:** Check sync on the final 10 seconds of the video (not just the first 5 seconds) to confirm zero VFR drift.

3. Test it right away (sample prompt & result)

Sample prompt / input
Transcribe episode14_cfr.mp4 (42 min) using Scribe v2 with keyterms ["FramesField", "Kokoro", "SeedVR2"], generate a 38-char YouTube SRT, and emit 9:16 karaoke ASS for our 35-second highlight clip.
What happens when it runs
Estimated Scribe v2 spend: $0.44 (42 min x $0.0104/min w/ keyterms).
Extracted timeline-zero audio_16k.wav -> ran fal-ai/elevenlabs/speech-to-text/scribe-v2.
Wrote 618 speaker-aware SRT cues (<=38 chars/line) -> episode14.srt.
Wrote 9:16 active-word ASS (MarginV=500) -> clip01_reels.ass + soft-muxed MP4 verified.

What you need & known limits

Requirements

  • FAL_KEY environment variable from fal.ai
  • Python 3 + FFmpeg (ffmpeg-full on macOS if hard-burning ASS via libass)

Watch out for

  • Default macOS Homebrew ffmpeg omits libass—use soft-mux (-c:s mov_text) or install homebrew-ffmpeg/ffmpeg/ffmpeg-full before running -vf ass=
  • Always conform VFR phone/screen captures to CFR BEFORE extracting audio_16k.wav so captions stay synced past minute 10

Turn raw audio into synced, brand-accurate captions without SaaS lock-in

Automated subtitle scripts break in three predictable places: container audio offsets cause end-of-video drift, missing domain vocabulary misspells brand names, and un-wrapped ASR blocks spill across mobile UI overlays. This SKILL.md teaches your agent to combine timeline-zero FFmpeg WAV extraction with ElevenLabs Scribe v2 ($0.008/min), keyterms spelling lock, and deterministic SRT/ASS formatting.

Frequently Asked Questions

Why must the skill force /scribe-v2 instead of the shorter /speech-to-text URL?
On fal.ai, fal-ai/elevenlabs/speech-to-text still bills legacy Scribe v1 at $0.03/minute. Pinning /scribe-v2 cuts cost by 3.75× to $0.008/minute and unlocks keyterms vocabulary boosting.
Why set MarginV=500 for 1080×1920 Reels and TikTok ASS captions?
TikTok, Instagram Reels, and YouTube Shorts cover the bottom ~380–450 pixels of a 1920px frame with descriptions, audio bars, and engagement buttons. Placing bottom-centered captions at MarginV=500 keeps active words cleanly visible inside the safe middle third.
Use this page in AI tools or notes
raw .md