Faster Whisper
Local speech-to-text using faster-whisper — a CTranslate2 reimplementation of OpenAI's Whisper that runs 4-6x faster with identical accuracy. With GPU acceleration, expect ~20x realtime transcription (a 10-minute audio file in ~30 seconds).
When to Use
Use this skill when you need to:
- Transcribe audio/video files — meetings, interviews, podcasts, lectures, YouTube videos
- Generate subtitles — SRT, VTT, ASS, LRC, or TTML broadcast-standard subtitles
- Identify speakers — diarization labels who said what (
--diarize)
- Transcribe from URLs — YouTube links and direct audio URLs (auto-downloads via yt-dlp)
- Transcribe podcast feeds —
--rss <feed-url> fetches and transcribes episodes
- Batch process files — glob patterns, directories, skip-existing support; ETA shown automatically
- Convert speech to text locally — no API costs, works offline (after model download)
- Translate to English — translate any language to English with
--translate
- Do multilingual transcription — supports 99+ languages with auto-detection
- Transcribe a batch of files in different languages —
--language-map assigns a different language per file
- Transcribe multilingual audio —
--multilingual for mixed-language audio
- Transcribe audio with specific terms — use
--initial-prompt for jargon-heavy content or any other terms to look out for
- Preprocess noisy audio (before transcription) —
--normalize and --denoise before transcription
- Stream output —
--stream shows segments as they're transcribed
- Clip time ranges —
--clip-timestamps to transcribe specific sections
- Search the transcript —
--search "term" finds all timestamps where a word/phrase appears
- Detect chapters —
--detect-chapters finds section breaks from silence gaps
- Export speaker audio —
--export-speakers DIR saves each speaker's turns as separate WAV files
- Spreadsheet output —
--format csv produces a properly-quoted CSV with timestamps
Trigger phrases:
"transcribe this audio", "convert speech to text", "what did they say", "make a transcript",
"audio to text", "subtitle this video", "who's speaking", "translate this audio", "translate to English",
"find where X is mentioned", "search transcript for", "when did they say", "at what timestamp",
"add chapters", "detect chapters", "find breaks in the audio", "table of contents for this recording",
"TTML subtitles", "DFXP subtitles", "broadcast format subtitles", "Netflix format",
"ASS subtitles", "aegisub format", "advanced substation alpha", "mpv subtitles",
"LRC subtitles", "timed lyrics", "karaoke subtitles", "music player lyrics",
"HTML transcript", "confidence-colored transcript", "color-coded transcript",
"separate audio per speaker", "export speaker audio", "split by speaker",
"transcript as CSV", "spreadsheet output", "transcribe podcast", "podcast RSS feed",
"different languages in batch", "per-file language",
"transcribe in multiple formats", "srt and txt at the same time", "output both srt and text",
"remove filler words", "clean up ums and uhs", "strip hesitation sounds", "remove you know and I mean",
"transcribe left channel", "transcribe right channel", "stereo channel", "left track only",
"wrap subtitle lines", "character limit per line", "max chars per subtitle",
"detect paragraphs", "paragraph breaks", "group into paragraphs", "add paragraph spacing"
⚠️ Agent guidance — keep invocations minimal:
CORE RULE: default command (./scripts/transcribe audio.mp3) is the fastest path — add flags only when the user explicitly asks for that capability.
Transcription:
- Only add
--diarize if the user asks "who said what" / "identify speakers" / "label speakers"
- Only add
--format srt/vtt/ass/lrc/ttml if the user asks for subtitles/captions in that format
- Only add
--format csv if the user asks for CSV or spreadsheet output
- Only add
--word-timestamps if the user needs word-level timing
- Only add
--initial-prompt if there's domain-specific jargon to prime
- Only add
--translate if the user wants non-English audio translated to English
- Only add
--normalize/--denoise if the user mentions bad audio quality or noise
- Only add
--stream if the user wants live/progressive output for long files
- Only add
--clip-timestamps if the user wants a specific time range
- Only add
--temperature 0.0 if the model is hallucinating on music/silence
- Only add
--vad-threshold if VAD is aggressively cutting speech or including noise
- Only add
--min-speakers/--max-speakers when you know the speaker count
- Only add
--hf-token if the token is not cached at ~/.cache/huggingface/token
- Only add
--max-words-per-line for subtitle readability on long segments
- Only add
--filter-hallucinations if the transcript contains obvious artifacts (music markers, duplicates)
- Only add
--merge-sentences if the user asks for sentence-level subtitle cues
- Only add
--clean-filler if the user asks to remove filler words (um, uh, you know, I mean, hesitation sounds)
- Only add
--channel left|right if the user mentions stereo tracks, dual-channel recordings, or asks for a specific channel
- Only add
--max-chars-per-line N when the user specifies a character limit per subtitle line (e.g., "Netflix format", "42 chars per line"); takes priority over --max-words-per-line
- Only add
--detect-paragraphs if the user asks for paragraph breaks or structured text output; --paragraph-gap (default 3.0s) only if they want a custom gap
- Only add
--speaker-names "Alice,Bob" when the user provides real names to replace SPEAKER_1/2 — always requires --diarize
- Only add
--hotwords WORDS when the user names specific rare terms not well served by --initial-prompt; prefer --initial-prompt for general domain jargon
- Only add
--prefix TEXT when the user knows the exact words the audio starts with
- Only add
--detect-language-only when the user only wants to identify the language, not transcribe
- Only add
--stats-file PATH if the user asks for performance stats, RTF, or benchmark info
- Only add
--parallel N for large CPU batch jobs; GPU handles one file efficiently on its own — don't add for single files or small batches
- Only add
--retries N for unreliable inputs (URLs, network files) where transient failures are expected
- Only add
--burn-in OUTPUT only when user explicitly asks to embed/burn subtitles into the video; requires ffmpeg and a video file input
- Only add
--keep-temp when the user may re-process the same URL to avoid re-downloading
- Only add
--output-template when user specifies a custom naming pattern in batch mode
- Multi-format output (
--format srt,text): only when user explicitly wants multiple formats in one pass; always pair with -o <dir>
- Any word-level feature auto-runs wav2vec2 alignment (~5-10s overhead)
--diarize adds ~20-30s on top of that
Search:
- Only add
--search "term" when the user asks to find/locate/search for a specific word or phrase in audio
--search replaces the normal transcript output — it prints only matching segments with timestamps
- Add
--search-fuzzy only when the user mentions approximate/partial matching or typos
- To save search results to a file, use
-o results.txt
Chapter detection:
- Only add
--detect-chapters when the user asks for chapters, sections, a table of contents, or "where does the topic change"
- Default
--chapter-gap 8 (8-second silence = new chapter) works for most podcasts/lectures; tune down for dense content
--chapter-format youtube (default) outputs YouTube-ready timestamps; use json for programmatic use
- Always use
--chapters-file PATH when combining chapters with a transcript output — avoids mixing chapter markers into the transcript text
- If the user only wants chapters (not the transcript), pipe stdout to a file with
-o /dev/null and use --chapters-file
- Batch mode limitation:
--chapters-file takes a single path — in batch mode, each file's chapters overwrite the previous. For batch chapter detection, omit --chapters-file (chapters print to stdout under === CHAPTERS (N) ===) or use a separate run per file
Speaker audio export:
- Only add
--export-speakers DIR when the user explicitly asks to save each speaker's audio separately
- Always pair with
--diarize — it silently skips if no speaker labels are present
- Requires ffmpeg; outputs
SPEAKER_1.wav, SPEAKER_2.wav, etc. (or real names if --speaker-names is set)
Language map:
- Only add
--language-map in batch mode when the user has confirmed different languages across files
- Inline format:
"interview*.mp3=en,lecture*.mp3=fr" — fnmatch globs on filename
- JSON file format:
@/path/to/map.json where the file is {"pattern": "lang_code"}
RSS / Podcast:
- Only add
--rss URL when the user provides a podcast RSS feed URL
- Default fetches 5 newest episodes;
--rss-latest 0 for all; --skip-existing to resume safely
- Always use
-o <dir> with --rss — without it, all episode transcripts print to stdout concatenated, which is hard to use; each episode gets its own file when -o <dir> is set
Output format for agent relay:
- Search results (
--search) → print directly to user; output is human-readable
- Chapter output → if no
--chapters-file, chapters appear in stdout under === CHAPTERS (N) === header after the transcript; with --format json, chapters are also embedded in the JSON under "chapters" key
- Subtitle formats (SRT, VTT, ASS, LRC, TTML) → always write to
-o file; tell the user the output path, never paste raw subtitle content
- Data formats (CSV, HTML, TTML, JSON) → always write to
-o file; tell the user the output path, don't paste raw XML/CSV/HTML
- ASS format → for Aegisub, VLC, mpv; write to file and tell user they can open it in Aegisub or play it in VLC/mpv
- LRC format → timed lyrics for music players (Foobar2000, AIMP, VLC); write to file
- Multi-format (
--format srt,text) → requires -o <dir>; each format goes to a separate file; tell user all paths written
- JSON format → useful for programmatic post-processing; not ideal to paste in full to user
- Text/transcript → safe to show directly to user for short files; summarise for long ones
- Stats output (
--stats-file) → summarise key fields (duration, processing time, RTF) for the user rather than pasting raw JSON
- Language detection (
--detect-language-only) → print the result directly; it's a single line
- ETA is printed automatically to stderr for batch jobs; no action needed
When NOT to use:
- Cloud-only environments without local compute
- Files <10 seconds where API call latency doesn't matter
faster-whisper vs whisperx:
This skill covers everything whisperx does — diarization (--diarize), word-level timestamps (--word-timestamps), SRT/VTT subtitles — so whisperx is not needed. Use whisperx only if you specifically need its pyannote pipeline or batch-GPU features not covered here.
Quick Reference
| Task |
Command |
Notes |
| Basic transcription |
./scripts/transcribe audio.mp3 |
Batched inference, VAD on, distil-large-v3.5 |
| SRT subtitles |
./scripts/transcribe audio.mp3 --format srt -o subs.srt |
Word timestamps auto-enabled |
| VTT subtitles |
./scripts/transcribe audio.mp3 --format vtt -o subs.vtt |
WebVTT format |
| Word timestamps |
./scripts/transcribe audio.mp3 --word-timestamps --format srt |
wav2vec2 aligned (~10ms) |
| Speaker diarization |
./scripts/transcribe audio.mp3 --diarize |
Requires pyannote.audio |
| Translate → English |
./scripts/transcribe audio.mp3 --translate |
Any language → English |
| Stream output |
./scripts/transcribe audio.mp3 --stream |
Live segments as transcribed |
| Clip time range |
./scripts/transcribe audio.mp3 --clip-timestamps "30,60" |
Only 30s–60s |
| Denoise + normalize |
./scripts/transcribe audio.mp3 --denoise --normalize |
Clean up noisy audio first |
| Reduce hallucination |
./scripts/transcribe audio.mp3 --hallucination-silence-threshold 1.0 |
Skip hallucinated silence |
| YouTube/URL |
./scripts/transcribe https://youtube.com/watch?v=... |
Auto-downloads via yt-dlp |
| Batch process |
./scripts/transcribe *.mp3 -o ./transcripts/ |
Output to directory |
| Batch with skip |
./scripts/transcribe *.mp3 --skip-existing -o ./out/ |
Resume interrupted batches |
| Domain terms |
./scripts/transcribe audio.mp3 --initial-prompt 'Kubernetes gRPC' |
Boost rare terminology |
| Hotwords boost |
./scripts/transcribe audio.mp3 --hotwords 'JIRA Kubernetes' |
Bias decoder toward specific words |
| Prefix conditioning |
./scripts/transcribe audio.mp3 --prefix 'Good morning,' |
Seed the first segment with known opening words |
| Pin model version |
./scripts/transcribe audio.mp3 --revision v1.2.0 |
Reproducible transcription with a pinned revision |
| Debug library logs |
./scripts/transcribe audio.mp3 --log-level debug |
Show faster_whisper internal logs |
| Turbo model |
./scripts/transcribe audio.mp3 -m turbo |
Alias for large-v3-turbo |
| Faster English |
./scripts/transcribe audio.mp3 --model distil-medium.en -l en |
English-only, 6.8x faster |
| Maximum accuracy |
./scripts/transcribe audio.mp3 --model large-v3 --beam-size 10 |
Full model |
| JSON output |
./scripts/transcribe audio.mp3 --format json -o out.json |
Programmatic access with stats |
| Filter noise |
./scripts/transcribe audio.mp3 --min-confidence 0.6 |
Drop low-confidence segments |
| Hybrid quantization |
./scripts/transcribe audio.mp3 --compute-type int8_float16 |
Save VRAM, minimal quality loss |
| Reduce batch size |
./scripts/transcribe audio.mp3 --batch-size 4 |
If OOM on GPU |
| TSV output |
./scripts/transcribe audio.mp3 --format tsv -o out.tsv |
OpenAI Whisper–compatible TSV |
| Fix hallucinations |
./scripts/transcribe audio.mp3 --temperature 0.0 --no-speech-threshold 0.8 |
Lock temperature + skip silence |
| Tune VAD sensitivity |
./scripts/transcribe audio.mp3 --vad-threshold 0.6 --min-silence-duration 500 |
Tighter speech detection |
| Known speaker count |
./scripts/transcribe meeting.wav --diarize --min-speakers 2 --max-speakers 3 |
Constrain diarization |
| Subtitle word wrapping |
./scripts/transcribe audio.mp3 --format srt --word-timestamps --max-words-per-line 8 |
Split long cues |
| Private/gated model |
./scripts/transcribe audio.mp3 --hf-token hf_xxx |
Pass token directly |
| Show version |
./scripts/transcribe --version |
Print faster-whisper version |
| Upgrade in-place |
./setup.sh --update |
Upgrade without full reinstall |
| System check |
./setup.sh --check |
Verify GPU, Python, ffmpeg, venv, yt-dlp, pyannote |
| Detect language only |
./scripts/transcribe audio.mp3 --detect-language-only |
Fast language ID, no transcription |
| Detect language JSON |
./scripts/transcribe audio.mp3 --detect-language-only --format json |
Machine-readable language detection |
| LRC subtitles |
./scripts/transcribe audio.mp3 --format lrc -o lyrics.lrc |
Timed lyrics format for music players |
| ASS subtitles |
./scripts/transcribe audio.mp3 --format ass -o subtitles.ass |
Advanced SubStation Alpha (Aegisub, mpv, VLC) |
| Merge sentences |
./scripts/transcribe audio.mp3 --format srt --merge-sentences |
Join fragments into sentence chunks |
| Stats sidecar |
./scripts/transcribe audio.mp3 --stats-file stats.json |
Write perf stats JSON after transcription |
| Batch stats |
./scripts/transcribe *.mp3 --stats-file ./stats/ |
One stats file per input in dir |
| Template naming |
./scripts/transcribe audio.mp3 -o ./out/ --output-template "{stem}_{lang}.{ext}" |
Custom batch output filenames |
| Stdin input |
ffmpeg -i input.mp4 -f wav - | ./scripts/transcribe - |
Pipe audio directly from stdin |
| Custom model dir |
./scripts/transcribe audio.mp3 --model-dir ~/my-models |
Custom HuggingFace cache dir |
| Local model |
./scripts/transcribe audio.mp3 -m ./my-model-ct2 |
CTranslate2 model dir |
| HTML transcript |
./scripts/transcribe audio.mp3 --format html -o out.html |
Confidence-colored |
| Burn subtitles |
./scripts/transcribe video.mp4 --burn-in output.mp4 |
Requires ffmpeg + video input |
| Name speakers |
./scripts/transcribe audio.mp3 --diarize --speaker-names "Alice,Bob" |
Replaces SPEAKER_1/2 |
| Filter hallucinations |
./scripts/transcribe audio.mp3 --filter-hallucinations |
Removes artifacts |
| Keep temp files |
./scripts/transcribe https://... --keep-temp |
For URL re-processing |
| Parallel batch |
./scripts/transcribe *.mp3 --parallel 4 -o ./out/ |
CPU multi-file |
| RTX 3070 recommended |
./scripts/transcribe audio.mp3 --compute-type int8_float16 |
Saves ~1GB VRAM, minimal quality loss |
| CPU thread count |
./scripts/transcribe audio.mp3 --threads 8 |
Force CPU thread count (default: auto) |
| Podcast RSS (latest 5) |
./scripts/transcribe --rss https://feeds.example.com/podcast.xml |
Downloads & transcribes newest 5 episodes |
| Podcast RSS (all episodes) |
./scripts/transcribe --rss https://... --rss-latest 0 -o ./episodes/ |
All episodes, one file each |
| Podcast + SRT subtitles |
./scripts/transcribe --rss https://... --format srt -o ./subs/ |
Subtitle all episodes |
| Retry on failure |
./scripts/transcribe *.mp3 --retries 3 -o ./out/ |
Retry up to 3× with backoff on error |
| CSV output |
./scripts/transcribe audio.mp3 --format csv -o out.csv |
Spreadsheet-ready with header row; properly quoted |
| CSV with speakers |
./scripts/transcribe audio.mp3 --diarize --format csv -o out.csv |
Adds speaker column |
| Language map (inline) |
./scripts/transcribe *.mp3 --language-map "interview*.mp3=en,lecture.wav=fr" |
Per-file language in batch |
| Language map (JSON) |
./scripts/transcribe *.mp3 --language-map @langs.json |
JSON file: {"pattern": "lang"} |
| Batch with ETA |
./scripts/transcribe *.mp3 -o ./out/ |
Automatic ETA shown for each file in batch |
| TTML subtitles |
./scripts/transcribe audio.mp3 --format ttml -o subtitles.ttml |
Broadcast-standard DFXP/TTML (Netflix, BBC, Amazon) |
| TTML with speaker labels |
./scripts/transcribe audio.mp3 --diarize --format ttml -o subtitles.ttml |
Speaker-labeled TTML |
| Search transcript |
./scripts/transcribe audio.mp3 --search "keyword" |
Find timestamps where keyword appears |
| Search to file |
./scripts/transcribe audio.mp3 --search "keyword" -o results.txt |
Save search results |
| Fuzzy search |
./scripts/transcribe audio.mp3 --search "aproximate" --search-fuzzy |
Approximate/partial matching |
| Detect chapters |
./scripts/transcribe audio.mp3 --detect-chapters |
Auto-detect chapters from silence gaps |
| Chapter gap tuning |
./scripts/transcribe audio.mp3 --detect-chapters --chapter-gap 5 |
Chapters on gaps ≥5s (default: 8s) |
| Chapters to file |
./scripts/transcribe audio.mp3 --detect-chapters --chapters-file ch.txt |
Save YouTube-format chapter list |
| Chapters JSON |
./scripts/transcribe audio.mp3 --detect-chapters --chapter-format json |
Machine-readable chapter list |
| Export speaker audio |
./scripts/transcribe audio.mp3 --diarize --export-speakers ./speakers/ |
Save each speaker's audio to separate WAV files |
| Multi-format output |
./scripts/transcribe audio.mp3 --format srt,text -o ./out/ |
Write SRT + TXT in one pass |
| Remove filler words |
./scripts/transcribe audio.mp3 --clean-filler |
Strip um/uh/er/ah/hmm and discourse markers |
| Left channel only |
./scripts/transcribe audio.mp3 --channel left |
Extract left stereo channel before transcribing |
| Right channel only |
./scripts/transcribe audio.mp3 --channel right |
Extract right stereo channel |
| Max chars per line |
./scripts/transcribe audio.mp3 --format srt --max-chars-per-line 42 |
Character-based subtitle wrapping |
| Detect paragraphs |
./scripts/transcribe audio.mp3 --detect-paragraphs |
Insert paragraph breaks in text output |
| Paragraph gap tuning |
./scripts/transcribe audio.mp3 --detect-paragraphs --paragraph-gap 5.0 |
Tune gap threshold (default 3.0s) |
Model Selection
Choose the right model for your needs:
digraph model_selection {
rankdir=LR;
node [shape=box, style=rounded];
start [label="Start", shape=doublecircle];
need_accuracy [label="Need maximum\naccuracy?", shape=diamond];
multilingual [label="Multilingual\ncontent?", shape=diamond];
resource_constrained [label="Resource\nconstraints?", shape=diamond];
large_v3 [label="large-v3\nor\nlarge-v3-turbo", style="rounded,filled", fillcolor=lightblue];
large_turbo [label="large-v3-turbo", style="rounded,filled", fillcolor=lightblue];
distil_large [label="distil-large-v3.5\n(default)", style="rounded,filled", fillcolor=lightgreen];
distil_medium [label="distil-medium.en", style="rounded,filled", fillcolor=lightyellow];
distil_small [label="distil-small.en", style="rounded,filled", fillcolor=lightyellow];
start -> need_accuracy;
need_accuracy -> large_v3 [label="yes"];
need_accuracy -> multilingual [label="no"];
multilingual -> large_turbo [label="yes"];
multilingual -> resource_constrained [label="no (English)"];
resource_constrained -> distil_small [label="mobile/edge"];
resource_constrained -> distil_medium [label="some limits"];
resource_constrained -> distil_large [label="no"];
}
Model Table
Standard Models (Full Whisper)
| Model |
Size |
Speed |
Accuracy |
Use Case |
tiny / tiny.en |
39M |
Fastest |
Basic |
Quick drafts |
base / base.en |
74M |
Very fast |
Good |
General use |
small / small.en |
244M |
Fast |
Better |
Most tasks |
medium / medium.en |
769M |
Moderate |
High |
Quality transcription |
large-v1/v2/v3 |
1.5GB |
Slower |
Best |
Maximum accuracy |
large-v3-turbo |
809M |
Fast |
Excellent |
High accuracy (slower than distil) |
Distilled Models (~6x Faster, ~1% WER difference)
| Model |
Size |
Speed vs Standard |
Accuracy |
Use Case |
distil-large-v3.5 |
756M |
~6.3x faster |
7.08% WER |
Default, best balance |
distil-large-v3 |
756M |
~6.3x faster |
7.53% WER |
Previous default |
distil-large-v2 |
756M |
~5.8x faster |
10.1% WER |
Fallback |
distil-medium.en |
394M |
~6.8x faster |
11.1% WER |
English-only, resource-constrained |
distil-small.en |
166M |
~5.6x faster |
12.1% WER |
Mobile/edge devices |
.en models are English-only and slightly faster/better for English content.
Note for distil models: HuggingFace recommends disabling condition_on_previous_text for all distil models to prevent repetition loops. The script auto-applies --no-condition-on-previous-text whenever a distil-* model is detected. Pass --condition-on-previous-text to override if needed.
Custom & Fine-tuned Models
WhisperModel accepts local CTranslate2 model directories and HuggingFace repo names — no code changes needed.
Load a local CTranslate2 model
./scripts/transcribe audio.mp3 --model /path/to/my-model-ct2
Convert a HuggingFace model to CTranslate2
pip install ctranslate2
ct2-transformers-converter \
--model openai/whisper-large-v3 \
--output_dir whisper-large-v3-ct2 \
--copy_files tokenizer.json preprocessor_config.json \
--quantization float16
./scripts/transcribe audio.mp3 --model ./whisper-large-v3-ct2
Load a model by HuggingFace repo name (auto-downloads)
./scripts/transcribe audio.mp3 --model username/whisper-large-v3-ct2
Custom model cache directory
By default, models are cached in ~/.cache/huggingface/. Use --model-dir to override:
./scripts/transcribe audio.mp3 --model-dir ~/my-models
Setup
Linux / macOS / WSL2
# Base install (creates venv, installs deps, auto-detects GPU)
./setup.sh
# With speaker diarization support
./setup.sh --diarize
Requirements:
- Python 3.10+
- ffmpeg is not required for basic transcription — PyAV (bundled with faster-whisper) handles audio decoding. ffmpeg is only needed for
--burn-in, --normalize, and --denoise.
- Optional: yt-dlp (for URL/YouTube input)
- Optional: pyannote.audio (for
--diarize, installed via setup.sh --diarize)
Platform Support
| Platform |
Acceleration |
Speed |
| Linux + NVIDIA GPU |
CUDA |
~20x realtime 🚀 |
| WSL2 + NVIDIA GPU |
CUDA |
~20x realtime 🚀 |
| macOS Apple Silicon |
CPU* |
~3-5x realtime |
| macOS Intel |
CPU |
~1-2x realtime |
| Linux (no GPU) |
CPU |
~1x realtime |
*faster-whisper uses CTranslate2 which is CPU-only on macOS, but Apple Silicon is fast enough for practical use.
GPU Support (IMPORTANT!)
The setup script auto-detects your GPU and installs PyTorch with CUDA. Always use GPU if available — CPU transcription is extremely slow.
| Hardware |
Speed |
9-min video |
| RTX 3070 (GPU) |
~20x realtime |
~27 sec |
| CPU (int8) |
~0.3x realtime |
~30 min |
RTX 3070 tip: Use --compute-type int8_float16 for hybrid quantization — saves ~1GB VRAM with minimal quality loss. Ideal for running diarization alongside transcription.
If setup didn't detect your GPU, manually install PyTorch with CUDA:
# For CUDA 12.x
uv pip install --python .venv/bin/python torch --index-url https://download.pytorch.org/whl/cu121
# For CUDA 11.x
uv pip install --python .venv/bin/python torch --index-url https://download.pytorch.org/whl/cu118
Usage
# Basic transcription
./scripts/transcribe audio.mp3
# SRT subtitles
./scripts/transcribe audio.mp3 --format srt -o subtitles.srt
# WebVTT subtitles
./scripts/transcribe audio.mp3 --format vtt -o subtitles.vtt
# Transcribe from YouTube URL
./scripts/transcribe https://youtube.com/watch?v=dQw4w9WgXcQ --language en
# Speaker diarization
./scripts/transcribe meeting.wav --diarize
# Diarized VTT subtitles
./scripts/transcribe meeting.wav --diarize --format vtt -o meeting.vtt
# Prime with domain terminology
./scripts/transcribe lecture.mp3 --initial-prompt "Kubernetes, gRPC, PostgreSQL, NGINX"
# Batch process a directory
./scripts/transcribe ./recordings/ -o ./transcripts/
# Batch with glob, skip already-done files
./scripts/transcribe *.mp3 --skip-existing -o ./transcripts/
# Filter low-confidence segments
./scripts/transcribe noisy-audio.mp3 --min-confidence 0.6
# JSON output with full metadata
./scripts/transcribe audio.mp3 --format json -o result.json
# Specify language (faster than auto-detect)
./scripts/transcribe audio.mp3 --language en
Options
Input:
AUDIO Audio file(s), directory, glob pattern, or URL
Accepts: mp3, wav, m4a, flac, ogg, webm, mp4, mkv, avi, wma, aac
URLs auto-download via yt-dlp (YouTube, direct links, etc.)
Model & Language:
-m, --model NAME Whisper model (default: distil-large-v3.5; "turbo" = large-v3-turbo)
--revision REV Model revision (git branch/tag/commit) to pin a specific version
-l, --language CODE Language code, e.g. en, es, fr (auto-detects if omitted)
--initial-prompt TEXT Prompt to condition the model (terminology, formatting style)
--prefix TEXT Prefix to condition the first segment (e.g. known starting words)
--hotwords WORDS Space-separated hotwords to boost recognition
--translate Translate any language to English (instead of transcribing)
--multilingual Enable multilingual/code-switching mode (helps smaller models)
--hf-token TOKEN HuggingFace token for private/gated models and diarization
--model-dir PATH Custom model cache directory (default: ~/.cache/huggingface/)
Output Format:
-f, --format FMT text | json | srt | vtt | tsv | lrc | html | ass | ttml (default: text)
Accepts comma-separated list: --format srt,text writes both in one pass
Multi-format requires -o <dir> when saving to files
--word-timestamps Include word-level timestamps (wav2vec2 aligned automatically)
--stream Output segments as they are transcribed (disables diarize/alignment)
--max-words-per-line N For SRT/VTT, split segments into sub-cues of at most N words
--max-chars-per-line N For SRT/VTT/ASS/TTML, split lines so each fits within N characters
Takes priority over --max-words-per-line when both are set
--clean-filler Remove hesitation fillers (um, uh, er, ah, hmm, hm) and discourse markers
(you know, I mean, you see) from transcript text. Off by default.
--detect-paragraphs Insert paragraph breaks (blank lines) in text output at natural boundaries.
A new paragraph starts when: silence gap ≥ --paragraph-gap, OR the previous
segment ends a sentence AND the gap ≥ 1.5s.
--paragraph-gap SEC Minimum silence gap in seconds to start a new paragraph (default: 3.0).
Used with --detect-paragraphs.
--channel {left,right,mix}
Stereo channel to transcribe: left (c0), right (c1), or mix (default: mix).
Extracts the channel via ffmpeg before transcription. Requires ffmpeg.
--merge-sentences Merge consecutive segments into sentence-level chunks
(improves SRT/VTT readability; groups by terminal punctuation or >2s gap)
-o, --output PATH Output file or directory (directory for batch mode)
--output-template TEMPLATE
Batch output filename template. Variables: {stem}, {lang}, {ext}, {model}
Example: "{stem}_{lang}.{ext}" → "interview_en.srt"
Inference Tuning:
--beam-size N Beam search size; higher = more accurate but slower (default: 5)
--temperature T Sampling temperature or comma-separated fallback list, e.g.
'0.0' or '0.0,0.2,0.4' (default: faster-whisper's schedule)
--no-speech-threshold PROB
Probability threshold to mark segments as silence (default: 0.6)
--batch-size N Batched inference batch size (default: 8; reduce if OOM)
--no-vad Disable voice activity detection (on by default)
--vad-threshold T VAD speech probability threshold (default: 0.5)
--vad-neg-threshold T VAD negative threshold for ending speech (default: auto)
--vad-onset T Alias for --vad-threshold (legacy)
--vad-offset T Alias for --vad-neg-threshold (legacy)
--min-speech-duration MS Minimum speech segment duration in ms (default: 0)
--max-speech-duration SEC Maximum speech segment duration in seconds (default: unlimited)
--min-silence-duration MS Minimum silence before splitting a segment in ms (default: 2000)
--speech-pad MS Padding around speech segments in ms (default: 400)
--no-batch Disable batched inference (use standard WhisperModel)
--hallucination-silence-threshold SEC
Skip silent sections where model hallucinates (e.g. 1.0)
--no-condition-on-previous-text
Don't condition on previous text (reduces repetition/hallucination loops;
auto-enabled for distil models per HuggingFace recommendation)
--condition-on-previous-text
Force-enable conditioning on previous text (overrides auto-disable for distil models)
--compression-ratio-threshold RATIO
Filter segments above this compression ratio (default: 2.4)
--log-prob-threshold PROB
Filter segments below this avg log probability (default: -1.0)
--max-new-tokens N Maximum tokens per segment (prevents runaway generation)
--clip-timestamps RANGE
Transcribe specific time ranges: '30,60' or '0,30;60,90' (seconds)
--progress Show transcription progress bar
--best-of N Candidates when sampling with non-zero temperature (default: 5)
--patience F Beam search patience factor (default: 1.0)
--repetition-penalty F Penalty for repeated tokens (default: 1.0)
--no-repeat-ngram-size N Prevent n-gram repetitions of this size (default: 0 = off)
Advanced Inference:
--no-timestamps Output text without timing info (faster; incompatible with
--word-timestamps, --format srt/vtt/tsv, --diarize)
--chunk-length N Audio chunk length in seconds for batched inference (default: auto)
--language-detection-threshold T
Confidence threshold for language auto-detection (default: 0.5)
--language-detection-segments N
Audio segments to sample for language detection (default: 1)
--length-penalty F Beam search length penalty; >1 favors longer, <1 favors shorter (default: 1.0)
--prompt-reset-on-temperature T
Reset initial prompt when temperature fallback hits threshold (default: 0.5)
--no-suppress-blank Disable blank token suppression (may help soft/quiet speech)
…(truncated)
1---
2name: faster-whisper
3description: "Local speech-to-text using faster-whisper. 4-6x faster than OpenAI Whisper with identical accuracy; GPU acceleration enables ~20x realtime transcription. SRT/VTT/TTML/CSV subtitles, speaker diarization, URL/YouTube input, batch processing with ETA, transcript search, chapter detection, per-file language map."
4version: 1.5.1
5author: ThePlasmak
6homepage: https://github.com/ThePlasmak/faster-whisper
7tags:
8 [
9 "audio",
10 "transcription",
11 "whisper",
12 "speech-to-text",
13 "ml",
14 "cuda",
15 "gpu",
16 "subtitles",
17 "diarization",
18 "podcast",
19 "chapters",
20 "search",
21 "csv",
22 "ttml",
23 "batch",
24 ]
25platforms: ["linux", "macos", "wsl2"]
26metadata:
27 source: https://skillmd.com/skills/modbender/faster-whisper
28 openclaw:
29 emoji: 🗣️
30 requires:
31 bins:
32 - python3
33 optionalBins:
34 - ffmpeg
35 - yt-dlp
36 optionalPaths:
37 - ~/.cache/huggingface/token
38---
39
40# Faster Whisper
41
42Local speech-to-text using faster-whisper — a CTranslate2 reimplementation of OpenAI's Whisper that runs **4-6x faster** with identical accuracy. With GPU acceleration, expect **~20x realtime** transcription (a 10-minute audio file in ~30 seconds).
43
44## When to Use
45
46Use this skill when you need to:
47
48- **Transcribe audio/video files** — meetings, interviews, podcasts, lectures, YouTube videos
49- **Generate subtitles** — SRT, VTT, ASS, LRC, or TTML broadcast-standard subtitles
50- **Identify speakers** — diarization labels who said what (`--diarize`)
51- **Transcribe from URLs** — YouTube links and direct audio URLs (auto-downloads via yt-dlp)
52- **Transcribe podcast feeds** — `--rss <feed-url>` fetches and transcribes episodes
53- **Batch process files** — glob patterns, directories, skip-existing support; ETA shown automatically
54- **Convert speech to text locally** — no API costs, works offline (after model download)
55- **Translate to English** — translate any language to English with `--translate`
56- **Do multilingual transcription** — supports 99+ languages with auto-detection
57- **Transcribe a batch of files in different languages** — `--language-map` assigns a different language per file
58- **Transcribe multilingual audio** — `--multilingual` for mixed-language audio
59- **Transcribe audio with specific terms** — use `--initial-prompt` for jargon-heavy content or any other terms to look out for
60- **Preprocess noisy audio (before transcription)** — `--normalize` and `--denoise` before transcription
61- **Stream output** — `--stream` shows segments as they're transcribed
62- **Clip time ranges** — `--clip-timestamps` to transcribe specific sections
63- **Search the transcript** — `--search "term"` finds all timestamps where a word/phrase appears
64- **Detect chapters** — `--detect-chapters` finds section breaks from silence gaps
65- **Export speaker audio** — `--export-speakers DIR` saves each speaker's turns as separate WAV files
66- **Spreadsheet output** — `--format csv` produces a properly-quoted CSV with timestamps
67
68**Trigger phrases:**
69"transcribe this audio", "convert speech to text", "what did they say", "make a transcript",
70"audio to text", "subtitle this video", "who's speaking", "translate this audio", "translate to English",
71"find where X is mentioned", "search transcript for", "when did they say", "at what timestamp",
72"add chapters", "detect chapters", "find breaks in the audio", "table of contents for this recording",
73"TTML subtitles", "DFXP subtitles", "broadcast format subtitles", "Netflix format",
74"ASS subtitles", "aegisub format", "advanced substation alpha", "mpv subtitles",
75"LRC subtitles", "timed lyrics", "karaoke subtitles", "music player lyrics",
76"HTML transcript", "confidence-colored transcript", "color-coded transcript",
77"separate audio per speaker", "export speaker audio", "split by speaker",
78"transcript as CSV", "spreadsheet output", "transcribe podcast", "podcast RSS feed",
79"different languages in batch", "per-file language",
80"transcribe in multiple formats", "srt and txt at the same time", "output both srt and text",
81"remove filler words", "clean up ums and uhs", "strip hesitation sounds", "remove you know and I mean",
82"transcribe left channel", "transcribe right channel", "stereo channel", "left track only",
83"wrap subtitle lines", "character limit per line", "max chars per subtitle",
84"detect paragraphs", "paragraph breaks", "group into paragraphs", "add paragraph spacing"
85
86**⚠️ Agent guidance — keep invocations minimal:**
87
88_CORE RULE: default command (`./scripts/transcribe audio.mp3`) is the fastest path — add flags only when the user explicitly asks for that capability._
89
90**Transcription:**
91
92- Only add `--diarize` if the user asks "who said what" / "identify speakers" / "label speakers"
93- Only add `--format srt/vtt/ass/lrc/ttml` if the user asks for subtitles/captions in that format
94- Only add `--format csv` if the user asks for CSV or spreadsheet output
95- Only add `--word-timestamps` if the user needs word-level timing
96- Only add `--initial-prompt` if there's domain-specific jargon to prime
97- Only add `--translate` if the user wants non-English audio translated to English
98- Only add `--normalize`/`--denoise` if the user mentions bad audio quality or noise
99- Only add `--stream` if the user wants live/progressive output for long files
100- Only add `--clip-timestamps` if the user wants a specific time range
101- Only add `--temperature 0.0` if the model is hallucinating on music/silence
102- Only add `--vad-threshold` if VAD is aggressively cutting speech or including noise
103- Only add `--min-speakers`/`--max-speakers` when you know the speaker count
104- Only add `--hf-token` if the token is not cached at `~/.cache/huggingface/token`
105- Only add `--max-words-per-line` for subtitle readability on long segments
106- Only add `--filter-hallucinations` if the transcript contains obvious artifacts (music markers, duplicates)
107- Only add `--merge-sentences` if the user asks for sentence-level subtitle cues
108- Only add `--clean-filler` if the user asks to remove filler words (um, uh, you know, I mean, hesitation sounds)
109- Only add `--channel left|right` if the user mentions stereo tracks, dual-channel recordings, or asks for a specific channel
110- Only add `--max-chars-per-line N` when the user specifies a character limit per subtitle line (e.g., "Netflix format", "42 chars per line"); takes priority over `--max-words-per-line`
111- Only add `--detect-paragraphs` if the user asks for paragraph breaks or structured text output; `--paragraph-gap` (default 3.0s) only if they want a custom gap
112- Only add `--speaker-names "Alice,Bob"` when the user provides real names to replace SPEAKER_1/2 — always requires `--diarize`
113- Only add `--hotwords WORDS` when the user names specific rare terms not well served by `--initial-prompt`; prefer `--initial-prompt` for general domain jargon
114- Only add `--prefix TEXT` when the user knows the exact words the audio starts with
115- Only add `--detect-language-only` when the user only wants to identify the language, not transcribe
116- Only add `--stats-file PATH` if the user asks for performance stats, RTF, or benchmark info
117- Only add `--parallel N` for large CPU batch jobs; GPU handles one file efficiently on its own — don't add for single files or small batches
118- Only add `--retries N` for unreliable inputs (URLs, network files) where transient failures are expected
119- Only add `--burn-in OUTPUT` only when user explicitly asks to embed/burn subtitles into the video; requires ffmpeg and a video file input
120- Only add `--keep-temp` when the user may re-process the same URL to avoid re-downloading
121- Only add `--output-template` when user specifies a custom naming pattern in batch mode
122- **Multi-format output** (`--format srt,text`): only when user explicitly wants multiple formats in one pass; always pair with `-o <dir>`
123- Any word-level feature auto-runs wav2vec2 alignment (~5-10s overhead)
124- `--diarize` adds ~20-30s on top of that
125
126**Search:**
127
128- Only add `--search "term"` when the user asks to find/locate/search for a specific word or phrase in audio
129- `--search` **replaces** the normal transcript output — it prints only matching segments with timestamps
130- Add `--search-fuzzy` only when the user mentions approximate/partial matching or typos
131- To save search results to a file, use `-o results.txt`
132
133**Chapter detection:**
134
135- Only add `--detect-chapters` when the user asks for chapters, sections, a table of contents, or "where does the topic change"
136- Default `--chapter-gap 8` (8-second silence = new chapter) works for most podcasts/lectures; tune down for dense content
137- `--chapter-format youtube` (default) outputs YouTube-ready timestamps; use `json` for programmatic use
138- **Always use `--chapters-file PATH`** when combining chapters with a transcript output — avoids mixing chapter markers into the transcript text
139- If the user only wants chapters (not the transcript), pipe stdout to a file with `-o /dev/null` and use `--chapters-file`
140- **Batch mode limitation:** `--chapters-file` takes a single path — in batch mode, each file's chapters overwrite the previous. For batch chapter detection, omit `--chapters-file` (chapters print to stdout under `=== CHAPTERS (N) ===`) or use a separate run per file
141
142**Speaker audio export:**
143
144- Only add `--export-speakers DIR` when the user explicitly asks to save each speaker's audio separately
145- Always pair with `--diarize` — it silently skips if no speaker labels are present
146- Requires ffmpeg; outputs `SPEAKER_1.wav`, `SPEAKER_2.wav`, etc. (or real names if `--speaker-names` is set)
147
148**Language map:**
149
150- Only add `--language-map` in batch mode when the user has confirmed different languages across files
151- Inline format: `"interview*.mp3=en,lecture*.mp3=fr"` — fnmatch globs on filename
152- JSON file format: `@/path/to/map.json` where the file is `{"pattern": "lang_code"}`
153
154**RSS / Podcast:**
155
156- Only add `--rss URL` when the user provides a podcast RSS feed URL
157- Default fetches 5 newest episodes; `--rss-latest 0` for all; `--skip-existing` to resume safely
158- **Always use `-o <dir>`** with `--rss` — without it, all episode transcripts print to stdout concatenated, which is hard to use; each episode gets its own file when `-o <dir>` is set
159
160**Output format for agent relay:**
161
162- **Search results** (`--search`) → print directly to user; output is human-readable
163- **Chapter output** → if no `--chapters-file`, chapters appear in stdout under `=== CHAPTERS (N) ===` header after the transcript; with `--format json`, chapters are also embedded in the JSON under `"chapters"` key
164- **Subtitle formats** (SRT, VTT, ASS, LRC, TTML) → always write to `-o` file; tell the user the output path, never paste raw subtitle content
165- **Data formats** (CSV, HTML, TTML, JSON) → always write to `-o` file; tell the user the output path, don't paste raw XML/CSV/HTML
166- **ASS format** → for Aegisub, VLC, mpv; write to file and tell user they can open it in Aegisub or play it in VLC/mpv
167- **LRC format** → timed lyrics for music players (Foobar2000, AIMP, VLC); write to file
168- **Multi-format** (`--format srt,text`) → requires `-o <dir>`; each format goes to a separate file; tell user all paths written
169- **JSON format** → useful for programmatic post-processing; not ideal to paste in full to user
170- **Text/transcript** → safe to show directly to user for short files; summarise for long ones
171- **Stats output** (`--stats-file`) → summarise key fields (duration, processing time, RTF) for the user rather than pasting raw JSON
172- **Language detection** (`--detect-language-only`) → print the result directly; it's a single line
173- **ETA** is printed automatically to stderr for batch jobs; no action needed
174
175**When NOT to use:**
176
177- Cloud-only environments without local compute
178- Files <10 seconds where API call latency doesn't matter
179
180**faster-whisper vs whisperx:**
181This skill covers everything whisperx does — diarization (`--diarize`), word-level timestamps (`--word-timestamps`), SRT/VTT subtitles — so whisperx is not needed. Use whisperx only if you specifically need its pyannote pipeline or batch-GPU features not covered here.
182
183## Quick Reference
184
185| Task | Command | Notes |
186| ------------------------------ | -------------------------------------------------------------------------------------- | --------------------------------------------------- |
187| **Basic transcription** | `./scripts/transcribe audio.mp3` | Batched inference, VAD on, distil-large-v3.5 |
188| **SRT subtitles** | `./scripts/transcribe audio.mp3 --format srt -o subs.srt` | Word timestamps auto-enabled |
189| **VTT subtitles** | `./scripts/transcribe audio.mp3 --format vtt -o subs.vtt` | WebVTT format |
190| **Word timestamps** | `./scripts/transcribe audio.mp3 --word-timestamps --format srt` | wav2vec2 aligned (~10ms) |
191| **Speaker diarization** | `./scripts/transcribe audio.mp3 --diarize` | Requires pyannote.audio |
192| **Translate → English** | `./scripts/transcribe audio.mp3 --translate` | Any language → English |
193| **Stream output** | `./scripts/transcribe audio.mp3 --stream` | Live segments as transcribed |
194| **Clip time range** | `./scripts/transcribe audio.mp3 --clip-timestamps "30,60"` | Only 30s–60s |
195| **Denoise + normalize** | `./scripts/transcribe audio.mp3 --denoise --normalize` | Clean up noisy audio first |
196| **Reduce hallucination** | `./scripts/transcribe audio.mp3 --hallucination-silence-threshold 1.0` | Skip hallucinated silence |
197| **YouTube/URL** | `./scripts/transcribe https://youtube.com/watch?v=...` | Auto-downloads via yt-dlp |
198| **Batch process** | `./scripts/transcribe *.mp3 -o ./transcripts/` | Output to directory |
199| **Batch with skip** | `./scripts/transcribe *.mp3 --skip-existing -o ./out/` | Resume interrupted batches |
200| **Domain terms** | `./scripts/transcribe audio.mp3 --initial-prompt 'Kubernetes gRPC'` | Boost rare terminology |
201| **Hotwords boost** | `./scripts/transcribe audio.mp3 --hotwords 'JIRA Kubernetes'` | Bias decoder toward specific words |
202| **Prefix conditioning** | `./scripts/transcribe audio.mp3 --prefix 'Good morning,'` | Seed the first segment with known opening words |
203| **Pin model version** | `./scripts/transcribe audio.mp3 --revision v1.2.0` | Reproducible transcription with a pinned revision |
204| **Debug library logs** | `./scripts/transcribe audio.mp3 --log-level debug` | Show faster_whisper internal logs |
205| **Turbo model** | `./scripts/transcribe audio.mp3 -m turbo` | Alias for large-v3-turbo |
206| **Faster English** | `./scripts/transcribe audio.mp3 --model distil-medium.en -l en` | English-only, 6.8x faster |
207| **Maximum accuracy** | `./scripts/transcribe audio.mp3 --model large-v3 --beam-size 10` | Full model |
208| **JSON output** | `./scripts/transcribe audio.mp3 --format json -o out.json` | Programmatic access with stats |
209| **Filter noise** | `./scripts/transcribe audio.mp3 --min-confidence 0.6` | Drop low-confidence segments |
210| **Hybrid quantization** | `./scripts/transcribe audio.mp3 --compute-type int8_float16` | Save VRAM, minimal quality loss |
211| **Reduce batch size** | `./scripts/transcribe audio.mp3 --batch-size 4` | If OOM on GPU |
212| **TSV output** | `./scripts/transcribe audio.mp3 --format tsv -o out.tsv` | OpenAI Whisper–compatible TSV |
213| **Fix hallucinations** | `./scripts/transcribe audio.mp3 --temperature 0.0 --no-speech-threshold 0.8` | Lock temperature + skip silence |
214| **Tune VAD sensitivity** | `./scripts/transcribe audio.mp3 --vad-threshold 0.6 --min-silence-duration 500` | Tighter speech detection |
215| **Known speaker count** | `./scripts/transcribe meeting.wav --diarize --min-speakers 2 --max-speakers 3` | Constrain diarization |
216| **Subtitle word wrapping** | `./scripts/transcribe audio.mp3 --format srt --word-timestamps --max-words-per-line 8` | Split long cues |
217| **Private/gated model** | `./scripts/transcribe audio.mp3 --hf-token hf_xxx` | Pass token directly |
218| **Show version** | `./scripts/transcribe --version` | Print faster-whisper version |
219| **Upgrade in-place** | `./setup.sh --update` | Upgrade without full reinstall |
220| **System check** | `./setup.sh --check` | Verify GPU, Python, ffmpeg, venv, yt-dlp, pyannote |
221| **Detect language only** | `./scripts/transcribe audio.mp3 --detect-language-only` | Fast language ID, no transcription |
222| **Detect language JSON** | `./scripts/transcribe audio.mp3 --detect-language-only --format json` | Machine-readable language detection |
223| **LRC subtitles** | `./scripts/transcribe audio.mp3 --format lrc -o lyrics.lrc` | Timed lyrics format for music players |
224| **ASS subtitles** | `./scripts/transcribe audio.mp3 --format ass -o subtitles.ass` | Advanced SubStation Alpha (Aegisub, mpv, VLC) |
225| **Merge sentences** | `./scripts/transcribe audio.mp3 --format srt --merge-sentences` | Join fragments into sentence chunks |
226| **Stats sidecar** | `./scripts/transcribe audio.mp3 --stats-file stats.json` | Write perf stats JSON after transcription |
227| **Batch stats** | `./scripts/transcribe *.mp3 --stats-file ./stats/` | One stats file per input in dir |
228| **Template naming** | `./scripts/transcribe audio.mp3 -o ./out/ --output-template "{stem}_{lang}.{ext}"` | Custom batch output filenames |
229| **Stdin input** | `ffmpeg -i input.mp4 -f wav - \| ./scripts/transcribe -` | Pipe audio directly from stdin |
230| **Custom model dir** | `./scripts/transcribe audio.mp3 --model-dir ~/my-models` | Custom HuggingFace cache dir |
231| **Local model** | `./scripts/transcribe audio.mp3 -m ./my-model-ct2` | CTranslate2 model dir |
232| **HTML transcript** | `./scripts/transcribe audio.mp3 --format html -o out.html` | Confidence-colored |
233| **Burn subtitles** | `./scripts/transcribe video.mp4 --burn-in output.mp4` | Requires ffmpeg + video input |
234| **Name speakers** | `./scripts/transcribe audio.mp3 --diarize --speaker-names "Alice,Bob"` | Replaces SPEAKER_1/2 |
235| **Filter hallucinations** | `./scripts/transcribe audio.mp3 --filter-hallucinations` | Removes artifacts |
236| **Keep temp files** | `./scripts/transcribe https://... --keep-temp` | For URL re-processing |
237| **Parallel batch** | `./scripts/transcribe *.mp3 --parallel 4 -o ./out/` | CPU multi-file |
238| **RTX 3070 recommended** | `./scripts/transcribe audio.mp3 --compute-type int8_float16` | Saves ~1GB VRAM, minimal quality loss |
239| **CPU thread count** | `./scripts/transcribe audio.mp3 --threads 8` | Force CPU thread count (default: auto) |
240| **Podcast RSS (latest 5)** | `./scripts/transcribe --rss https://feeds.example.com/podcast.xml` | Downloads & transcribes newest 5 episodes |
241| **Podcast RSS (all episodes)** | `./scripts/transcribe --rss https://... --rss-latest 0 -o ./episodes/` | All episodes, one file each |
242| **Podcast + SRT subtitles** | `./scripts/transcribe --rss https://... --format srt -o ./subs/` | Subtitle all episodes |
243| **Retry on failure** | `./scripts/transcribe *.mp3 --retries 3 -o ./out/` | Retry up to 3× with backoff on error |
244| **CSV output** | `./scripts/transcribe audio.mp3 --format csv -o out.csv` | Spreadsheet-ready with header row; properly quoted |
245| **CSV with speakers** | `./scripts/transcribe audio.mp3 --diarize --format csv -o out.csv` | Adds speaker column |
246| **Language map (inline)** | `./scripts/transcribe *.mp3 --language-map "interview*.mp3=en,lecture.wav=fr"` | Per-file language in batch |
247| **Language map (JSON)** | `./scripts/transcribe *.mp3 --language-map @langs.json` | JSON file: {"pattern": "lang"} |
248| **Batch with ETA** | `./scripts/transcribe *.mp3 -o ./out/` | Automatic ETA shown for each file in batch |
249| **TTML subtitles** | `./scripts/transcribe audio.mp3 --format ttml -o subtitles.ttml` | Broadcast-standard DFXP/TTML (Netflix, BBC, Amazon) |
250| **TTML with speaker labels** | `./scripts/transcribe audio.mp3 --diarize --format ttml -o subtitles.ttml` | Speaker-labeled TTML |
251| **Search transcript** | `./scripts/transcribe audio.mp3 --search "keyword"` | Find timestamps where keyword appears |
252| **Search to file** | `./scripts/transcribe audio.mp3 --search "keyword" -o results.txt` | Save search results |
253| **Fuzzy search** | `./scripts/transcribe audio.mp3 --search "aproximate" --search-fuzzy` | Approximate/partial matching |
254| **Detect chapters** | `./scripts/transcribe audio.mp3 --detect-chapters` | Auto-detect chapters from silence gaps |
255| **Chapter gap tuning** | `./scripts/transcribe audio.mp3 --detect-chapters --chapter-gap 5` | Chapters on gaps ≥5s (default: 8s) |
256| **Chapters to file** | `./scripts/transcribe audio.mp3 --detect-chapters --chapters-file ch.txt` | Save YouTube-format chapter list |
257| **Chapters JSON** | `./scripts/transcribe audio.mp3 --detect-chapters --chapter-format json` | Machine-readable chapter list |
258| **Export speaker audio** | `./scripts/transcribe audio.mp3 --diarize --export-speakers ./speakers/` | Save each speaker's audio to separate WAV files |
259| **Multi-format output** | `./scripts/transcribe audio.mp3 --format srt,text -o ./out/` | Write SRT + TXT in one pass |
260| **Remove filler words** | `./scripts/transcribe audio.mp3 --clean-filler` | Strip um/uh/er/ah/hmm and discourse markers |
261| **Left channel only** | `./scripts/transcribe audio.mp3 --channel left` | Extract left stereo channel before transcribing |
262| **Right channel only** | `./scripts/transcribe audio.mp3 --channel right` | Extract right stereo channel |
263| **Max chars per line** | `./scripts/transcribe audio.mp3 --format srt --max-chars-per-line 42` | Character-based subtitle wrapping |
264| **Detect paragraphs** | `./scripts/transcribe audio.mp3 --detect-paragraphs` | Insert paragraph breaks in text output |
265| **Paragraph gap tuning** | `./scripts/transcribe audio.mp3 --detect-paragraphs --paragraph-gap 5.0` | Tune gap threshold (default 3.0s) |
266
267## Model Selection
268
269Choose the right model for your needs:
270
271```dot
272digraph model_selection {
273 rankdir=LR;
274 node [shape=box, style=rounded];
275
276 start [label="Start", shape=doublecircle];
277 need_accuracy [label="Need maximum\naccuracy?", shape=diamond];
278 multilingual [label="Multilingual\ncontent?", shape=diamond];
279 resource_constrained [label="Resource\nconstraints?", shape=diamond];
280
281 large_v3 [label="large-v3\nor\nlarge-v3-turbo", style="rounded,filled", fillcolor=lightblue];
282 large_turbo [label="large-v3-turbo", style="rounded,filled", fillcolor=lightblue];
283 distil_large [label="distil-large-v3.5\n(default)", style="rounded,filled", fillcolor=lightgreen];
284 distil_medium [label="distil-medium.en", style="rounded,filled", fillcolor=lightyellow];
285 distil_small [label="distil-small.en", style="rounded,filled", fillcolor=lightyellow];
286
287 start -> need_accuracy;
288 need_accuracy -> large_v3 [label="yes"];
289 need_accuracy -> multilingual [label="no"];
290 multilingual -> large_turbo [label="yes"];
291 multilingual -> resource_constrained [label="no (English)"];
292 resource_constrained -> distil_small [label="mobile/edge"];
293 resource_constrained -> distil_medium [label="some limits"];
294 resource_constrained -> distil_large [label="no"];
295}
296```
297
298### Model Table
299
300#### Standard Models (Full Whisper)
301
302| Model | Size | Speed | Accuracy | Use Case |
303| ---------------------- | ----- | --------- | --------- | ---------------------------------- |
304| `tiny` / `tiny.en` | 39M | Fastest | Basic | Quick drafts |
305| `base` / `base.en` | 74M | Very fast | Good | General use |
306| `small` / `small.en` | 244M | Fast | Better | Most tasks |
307| `medium` / `medium.en` | 769M | Moderate | High | Quality transcription |
308| `large-v1/v2/v3` | 1.5GB | Slower | Best | Maximum accuracy |
309| `large-v3-turbo` | 809M | Fast | Excellent | High accuracy (slower than distil) |
310
311#### Distilled Models (~6x Faster, ~1% WER difference)
312
313| Model | Size | Speed vs Standard | Accuracy | Use Case |
314| ----------------------- | ---- | ----------------- | --------- | ---------------------------------- |
315| **`distil-large-v3.5`** | 756M | ~6.3x faster | 7.08% WER | **Default, best balance** |
316| `distil-large-v3` | 756M | ~6.3x faster | 7.53% WER | Previous default |
317| `distil-large-v2` | 756M | ~5.8x faster | 10.1% WER | Fallback |
318| `distil-medium.en` | 394M | ~6.8x faster | 11.1% WER | English-only, resource-constrained |
319| `distil-small.en` | 166M | ~5.6x faster | 12.1% WER | Mobile/edge devices |
320
321`.en` models are English-only and slightly faster/better for English content.
322
323> **Note for distil models:** HuggingFace recommends disabling `condition_on_previous_text` for all distil models to prevent repetition loops. The script **auto-applies** `--no-condition-on-previous-text` whenever a `distil-*` model is detected. Pass `--condition-on-previous-text` to override if needed.
324
325## Custom & Fine-tuned Models
326
327WhisperModel accepts local CTranslate2 model directories and HuggingFace repo names — no code changes needed.
328
329### Load a local CTranslate2 model
330
331```bash
332./scripts/transcribe audio.mp3 --model /path/to/my-model-ct2
333```
334
335### Convert a HuggingFace model to CTranslate2
336
337```bash
338pip install ctranslate2
339ct2-transformers-converter \
340 --model openai/whisper-large-v3 \
341 --output_dir whisper-large-v3-ct2 \
342 --copy_files tokenizer.json preprocessor_config.json \
343 --quantization float16
344./scripts/transcribe audio.mp3 --model ./whisper-large-v3-ct2
345```
346
347### Load a model by HuggingFace repo name (auto-downloads)
348
349```bash
350./scripts/transcribe audio.mp3 --model username/whisper-large-v3-ct2
351```
352
353### Custom model cache directory
354
355By default, models are cached in `~/.cache/huggingface/`. Use `--model-dir` to override:
356
357```bash
358./scripts/transcribe audio.mp3 --model-dir ~/my-models
359```
360
361## Setup
362
363### Linux / macOS / WSL2
364
365```bash
366# Base install (creates venv, installs deps, auto-detects GPU)
367./setup.sh
368
369# With speaker diarization support
370./setup.sh --diarize
371```
372
373Requirements:
374
375- Python 3.10+
376- ffmpeg is **not required** for basic transcription — PyAV (bundled with faster-whisper) handles audio decoding. ffmpeg is only needed for `--burn-in`, `--normalize`, and `--denoise`.
377- Optional: yt-dlp (for URL/YouTube input)
378- Optional: pyannote.audio (for `--diarize`, installed via `setup.sh --diarize`)
379
380### Platform Support
381
382| Platform | Acceleration | Speed |
383| ---------------------- | ------------ | ---------------- |
384| **Linux + NVIDIA GPU** | CUDA | ~20x realtime 🚀 |
385| **WSL2 + NVIDIA GPU** | CUDA | ~20x realtime 🚀 |
386| macOS Apple Silicon | CPU\* | ~3-5x realtime |
387| macOS Intel | CPU | ~1-2x realtime |
388| Linux (no GPU) | CPU | ~1x realtime |
389
390\*faster-whisper uses CTranslate2 which is CPU-only on macOS, but Apple Silicon is fast enough for practical use.
391
392### GPU Support (IMPORTANT!)
393
394The setup script auto-detects your GPU and installs PyTorch with CUDA. **Always use GPU if available** — CPU transcription is extremely slow.
395
396| Hardware | Speed | 9-min video |
397| -------------- | -------------- | ----------- |
398| RTX 3070 (GPU) | ~20x realtime | ~27 sec |
399| CPU (int8) | ~0.3x realtime | ~30 min |
400
401> **RTX 3070 tip**: Use `--compute-type int8_float16` for hybrid quantization — saves ~1GB VRAM with minimal quality loss. Ideal for running diarization alongside transcription.
402
403If setup didn't detect your GPU, manually install PyTorch with CUDA:
404
405```bash
406# For CUDA 12.x
407uv pip install --python .venv/bin/python torch --index-url https://download.pytorch.org/whl/cu121
408
409# For CUDA 11.x
410uv pip install --python .venv/bin/python torch --index-url https://download.pytorch.org/whl/cu118
411```
412
413- **WSL2 users**: Ensure you have the [NVIDIA CUDA drivers for WSL](https://docs.nvidia.com/cuda/wsl-user-guide/) installed on Windows
414
415## Usage
416
417```bash
418# Basic transcription
419./scripts/transcribe audio.mp3
420
421# SRT subtitles
422./scripts/transcribe audio.mp3 --format srt -o subtitles.srt
423
424# WebVTT subtitles
425./scripts/transcribe audio.mp3 --format vtt -o subtitles.vtt
426
427# Transcribe from YouTube URL
428./scripts/transcribe https://youtube.com/watch?v=dQw4w9WgXcQ --language en
429
430# Speaker diarization
431./scripts/transcribe meeting.wav --diarize
432
433# Diarized VTT subtitles
434./scripts/transcribe meeting.wav --diarize --format vtt -o meeting.vtt
435
436# Prime with domain terminology
437./scripts/transcribe lecture.mp3 --initial-prompt "Kubernetes, gRPC, PostgreSQL, NGINX"
438
439# Batch process a directory
440./scripts/transcribe ./recordings/ -o ./transcripts/
441
442# Batch with glob, skip already-done files
443./scripts/transcribe *.mp3 --skip-existing -o ./transcripts/
444
445# Filter low-confidence segments
446./scripts/transcribe noisy-audio.mp3 --min-confidence 0.6
447
448# JSON output with full metadata
449./scripts/transcribe audio.mp3 --format json -o result.json
450
451# Specify language (faster than auto-detect)
452./scripts/transcribe audio.mp3 --language en
453```
454
455## Options
456
457```
458Input:
459 AUDIO Audio file(s), directory, glob pattern, or URL
460 Accepts: mp3, wav, m4a, flac, ogg, webm, mp4, mkv, avi, wma, aac
461 URLs auto-download via yt-dlp (YouTube, direct links, etc.)
462
463Model & Language:
464 -m, --model NAME Whisper model (default: distil-large-v3.5; "turbo" = large-v3-turbo)
465 --revision REV Model revision (git branch/tag/commit) to pin a specific version
466 -l, --language CODE Language code, e.g. en, es, fr (auto-detects if omitted)
467 --initial-prompt TEXT Prompt to condition the model (terminology, formatting style)
468 --prefix TEXT Prefix to condition the first segment (e.g. known starting words)
469 --hotwords WORDS Space-separated hotwords to boost recognition
470 --translate Translate any language to English (instead of transcribing)
471 --multilingual Enable multilingual/code-switching mode (helps smaller models)
472 --hf-token TOKEN HuggingFace token for private/gated models and diarization
473 --model-dir PATH Custom model cache directory (default: ~/.cache/huggingface/)
474
475Output Format:
476 -f, --format FMT text | json | srt | vtt | tsv | lrc | html | ass | ttml (default: text)
477 Accepts comma-separated list: --format srt,text writes both in one pass
478 Multi-format requires -o <dir> when saving to files
479 --word-timestamps Include word-level timestamps (wav2vec2 aligned automatically)
480 --stream Output segments as they are transcribed (disables diarize/alignment)
481 --max-words-per-line N For SRT/VTT, split segments into sub-cues of at most N words
482 --max-chars-per-line N For SRT/VTT/ASS/TTML, split lines so each fits within N characters
483 Takes priority over --max-words-per-line when both are set
484 --clean-filler Remove hesitation fillers (um, uh, er, ah, hmm, hm) and discourse markers
485 (you know, I mean, you see) from transcript text. Off by default.
486 --detect-paragraphs Insert paragraph breaks (blank lines) in text output at natural boundaries.
487 A new paragraph starts when: silence gap ≥ --paragraph-gap, OR the previous
488 segment ends a sentence AND the gap ≥ 1.5s.
489 --paragraph-gap SEC Minimum silence gap in seconds to start a new paragraph (default: 3.0).
490 Used with --detect-paragraphs.
491 --channel {left,right,mix}
492 Stereo channel to transcribe: left (c0), right (c1), or mix (default: mix).
493 Extracts the channel via ffmpeg before transcription. Requires ffmpeg.
494 --merge-sentences Merge consecutive segments into sentence-level chunks
495 (improves SRT/VTT readability; groups by terminal punctuation or >2s gap)
496 -o, --output PATH Output file or directory (directory for batch mode)
497 --output-template TEMPLATE
498 Batch output filename template. Variables: {stem}, {lang}, {ext}, {model}
499 Example: "{stem}_{lang}.{ext}" → "interview_en.srt"
500
501Inference Tuning:
502 --beam-size N Beam search size; higher = more accurate but slower (default: 5)
503 --temperature T Sampling temperature or comma-separated fallback list, e.g.
504 '0.0' or '0.0,0.2,0.4' (default: faster-whisper's schedule)
505 --no-speech-threshold PROB
506 Probability threshold to mark segments as silence (default: 0.6)
507 --batch-size N Batched inference batch size (default: 8; reduce if OOM)
508 --no-vad Disable voice activity detection (on by default)
509 --vad-threshold T VAD speech probability threshold (default: 0.5)
510 --vad-neg-threshold T VAD negative threshold for ending speech (default: auto)
511 --vad-onset T Alias for --vad-threshold (legacy)
512 --vad-offset T Alias for --vad-neg-threshold (legacy)
513 --min-speech-duration MS Minimum speech segment duration in ms (default: 0)
514 --max-speech-duration SEC Maximum speech segment duration in seconds (default: unlimited)
515 --min-silence-duration MS Minimum silence before splitting a segment in ms (default: 2000)
516 --speech-pad MS Padding around speech segments in ms (default: 400)
517 --no-batch Disable batched inference (use standard WhisperModel)
518 --hallucination-silence-threshold SEC
519 Skip silent sections where model hallucinates (e.g. 1.0)
520 --no-condition-on-previous-text
521 Don't condition on previous text (reduces repetition/hallucination loops;
522 auto-enabled for distil models per HuggingFace recommendation)
523 --condition-on-previous-text
524 Force-enable conditioning on previous text (overrides auto-disable for distil models)
525 --compression-ratio-threshold RATIO
526 Filter segments above this compression ratio (default: 2.4)
527 --log-prob-threshold PROB
528 Filter segments below this avg log probability (default: -1.0)
529 --max-new-tokens N Maximum tokens per segment (prevents runaway generation)
530 --clip-timestamps RANGE
531 Transcribe specific time ranges: '30,60' or '0,30;60,90' (seconds)
532 --progress Show transcription progress bar
533 --best-of N Candidates when sampling with non-zero temperature (default: 5)
534 --patience F Beam search patience factor (default: 1.0)
535 --repetition-penalty F Penalty for repeated tokens (default: 1.0)
536 --no-repeat-ngram-size N Prevent n-gram repetitions of this size (default: 0 = off)
537
538Advanced Inference:
539 --no-timestamps Output text without timing info (faster; incompatible with
540 --word-timestamps, --format srt/vtt/tsv, --diarize)
541 --chunk-length N Audio chunk length in seconds for batched inference (default: auto)
542 --language-detection-threshold T
543 Confidence threshold for language auto-detection (default: 0.5)
544 --language-detection-segments N
545 Audio segments to sample for language detection (default: 1)
546 --length-penalty F Beam search length penalty; >1 favors longer, <1 favors shorter (default: 1.0)
547 --prompt-reset-on-temperature T
548 Reset initial prompt when temperature fallback hits threshold (default: 0.5)
549 --no-suppress-blank Disable blank token suppression (may help soft/quiet speech)
550 --suppress-tokens IDS Comma-separated token IDs to suppress in addition to default -1
551 --max-initial-timestamp T
552 Maximum timestamp for the first segment in seconds (default: 1.0)
553 --prepend-punctuations CHARS
554 Punctuation characters merged into preceding word (default: "'¿([{-)
555 --append-punctuations CHARS
556 Punctuation characters merged into following word (default: "'.。,,!!??::")]}、")
557
558Preprocessing:
559 --normalize Normalize audio volume (EBU R128 loudnorm) before transcription
560 --denoise Apply noise reduction (high-pass + FFT denoise) before transcription
561
562Advanced:
563 --diarize Speaker diarization (requires pyannote.audio)
564 --min-speakers N Minimum number of speakers hint for diarization
565 --max-speakers N Maximum number of speakers hint for diarization
566 --speaker-names NAMES Comma-separated names to replace SPEAKER_1, SPEAKER_2 (e.g. 'Alice,Bob')
567 Requires --diarize
568 --min-confidence PROB Filter segments below this avg word confidence (0.0–1.0)
569 --skip-existing Skip files whose output already exists (batch mode)
570 --detect-language-only
571 Detect language and exit (no transcription). Output: "Language: en (probability: 0.984)"
572 With --format json: {"language": "en", "language_probability": 0.984}
573 --stats-file PATH Write JSON stats sidecar after transcription (processing time, RTF, word count, etc.)
574 Directory path → writes {stem}.stats.json inside; file path → exact path
575 --burn-in OUTPUT Burn subtitles into the original video (single-file mode only; requires ffmpeg)
576 --filter-hallucinations
577 Filter common Whisper hallucinations: music/applause markers, duplicate segments,
578 'Thank you for watching', lone punctuation, etc.
579 --keep-temp Keep temp files from URL downloads (useful for re-processing without re-downloading)
580 --parallel N Number of parallel workers for batch processing (default: sequential)
581 --retries N Retry failed files up to N times with exponential backoff (default: 0;
582 incompatible with --parallel)
583
584Batch ETA:
585 Automatically shown for sequential batch jobs (no flag needed). After each file completes,
586 the next file's progress line includes: [current/total] filename | ETA: Xm Ys
587 ETA is calculated from average time per file × remaining files.
588 Shown to stderr (surfaced to users via OpenClaw/Clawdbot output).
589
590Language Map (per-file language override):
591 --language-map MAP Per-file language override for batch mode. Two forms:
592 Inline: "interview*.mp3=en,lecture.wav=fr,keynote.wav=de"
593 JSON file: "@/path/to/map.json" (must be {pattern: lang} dict)
594 Patterns support fnmatch globs on filename or stem.
595 Priority: exact filename > exact stem > glob on filename > glob on stem > fallback.
596 Files not matched fall back to --language (or auto-detect if not set).
597
598Transcript Search:
599 --search TERM Search the transcript for TERM and print matching segments with timestamps.
600 Replaces normal transcript output (use -o to save results to a file).
601 Case-insensitive exact substring match by default.
602 --search-fuzzy Enable fuzzy/approximate matching with --search (useful for typos, phonetic
603 near-misses, or partial words; uses SequenceMatcher ratio ≥ 0.6)
604
605Chapter Detection:
606 --detect-chapters Auto-detect chapter/section breaks from silence gaps and print chapter markers.
607 Output is printed after the transcript (or to --chapters-file).
608 --chapter-gap SEC Minimum silence gap in seconds between consecutive segments to start a new
609 chapter (default: 8.0). Tune down for dense speech, up for sparse content.
610 --chapters-file PATH Write chapter markers to this file (default: stdout after transcript)
611 --chapter-format FMT youtube | text | json — chapter output format:
612 youtube: "0:00 Chapter 1" (YouTube description ready)
613 text: "Chapter 1: 00:00:00"
614 json: JSON array with chapter, start, title fields
615 (default: youtube)
616
617Speaker Audio Export:
618 --export-speakers DIR After diarization, export each speaker's audio turns concatenated into
619 separate WAV files saved in DIR. Requires --diarize and ffmpeg.
620 Output: SPEAKER_1.wav, SPEAKER_2.wav, … (or real names if --speaker-names set)
621
622RSS / Podcast:
623 --rss URL Podcast RSS feed URL — extracts audio enclosures and transcribes them.
624 AUDIO positional is optional when --rss is used.
625 --rss-latest N Number of most-recent episodes to process (default: 5; 0 = all episodes)
626
627Device:
628 --device DEV auto | cpu | cuda (default: auto)
629 --compute-type TYPE auto | int8 | int8_float16 | float16 | float32 (default: auto)
630 int8_float16 = hybrid mode for GPU (saves VRAM, minimal quality loss)
631 --threads N CPU thread count for CTranslate2 (default: auto)
632 -q, --quiet Suppress progress and status messages
633 --log-level LEVEL Set faster_whisper library logging level: debug | info | warning | error
634 (default: warning; use debug to see CTranslate2/VAD internals)
635
636Utility:
637 --version Print installed faster-whisper version and exit
638 --update Upgrade faster-whisper in the skill venv and exit
639```
640
641## Output Formats
642
643### Text (default)
644
645Plain transcript text. With `--diarize`, speaker labels are inserted:
646
647```
648[SPEAKER_1]
649 Hello, welcome to the meeting.
650[SPEAKER_2]
651 Thanks for having me.
652```
653
654### JSON (`--format json`)
655
656Full metadata including segments, timestamps, language detection, and performance stats:
657
658```json
659{
660 "file": "audio.mp3",
661 "text": "Hello, welcome...",
662 "language": "en",
663 "language_probability": 0.98,
664 "duration": 600.5,
665 "segments": [...],
666 "speakers": ["SPEAKER_1", "SPEAKER_2"],
667 "stats": {
668 "processing_time": 28.3,
669 "realtime_factor": 21.2
670 }
671}
672```
673
674### SRT (`--format srt`)
675
676Standard subtitle format for video players:
677
678```
6791
68000:00:00,000 --> 00:00:02,500
681[SPEAKER_1] Hello, welcome to the meeting.
682
6832
68400:00:02,800 --> 00:00:04,200
685[SPEAKER_2] Thanks for having me.
686```
687
688### VTT (`--format vtt`)
689
690WebVTT format for web video players:
691
692```
693WEBVTT
694
6951
69600:00:00.000 --> 00:00:02.500
697[SPEAKER_1] Hello, welcome to the meeting.
698
6992
70000:00:02.800 --> 00:00:04.200
701[SPEAKER_2] Thanks for having me.
702```
703
704### TSV (`--format tsv`)
705
706Tab-separated values, OpenAI Whisper–compatible. Columns: `start_ms`, `end_ms`, `text`:
707
708```
7090 2500 Hello, welcome to the meeting.
7102800 4200 Thanks for having me.
711```
712
713Useful for piping into other tools or spreadsheets. No header row.
714
715### ASS/SSA (`--format ass`)
716
717Advanced SubStation Alpha format — supported by Aegisub, VLC, mpv, MPC-HC, and most video editors. Offers richer styling than SRT (font, size, color, position) via the `[V4+ Styles]` section:
718
719```
720[Script Info]
721ScriptType: v4.00+
722...
723
724[V4+ Styles]
725Style: Default,Arial,20,&H00FFFFFF,...
726
727[Events]
728Format: Layer, Start, End, Style, Name, ..., Text
729Dialogue: 0,0:00:00.00,0:00:02.50,Default,,[SPEAKER_1] Hello, welcome.
730Dialogue: 0,0:00:02.80,0:00:04.20,Default,,[SPEAKER_2] Thanks for having me.
731```
732
733Timestamps use `H:MM:SS.cc` (centiseconds). Edit the `[V4+ Styles]` block in Aegisub to customise font, color, and position without re-transcribing.
734
735### LRC (`--format lrc`)
736
737Timed lyrics format used by music players (e.g., Foobar2000, VLC, AIMP). Timestamps use `[mm:ss.xx]` where `xx` = centiseconds:
738
739```
740[00:00.50]Hello, welcome to the meeting.
741[00:02.80]Thanks for having me.
742```
743
744With diarization, speaker labels are included:
745
746```
747[00:00.50][SPEAKER_1] Hello, welcome to the meeting.
748[00:02.80][SPEAKER_2] Thanks for having me.
749```
750
751Default file extension: `.lrc`. Useful for music transcription, karaoke, and any workflow requiring timed text with music-player compatibility.
752
753## Speaker Diarization
754
755Identifies who spoke when using [pyannote.audio](https://github.com/pyannote/pyannote-audio).
756
757**Setup:**
758
759```bash
760./setup.sh --diarize
761```
762
763**Requirements:**
764
765- HuggingFace token at `~/.cache/huggingface/token` (`huggingface-cli login`)
766- Accepted model agreements:
767 - https://hf.co/pyannote/speaker-diarization-3.1
768 - https://hf.co/pyannote/segmentation-3.0
769
770**Usage:**
771
772```bash
773# Basic diarization (text output)
774./scripts/transcribe meeting.wav --diarize
775
776# Diarized subtitles
777./scripts/transcribe meeting.wav --diarize --format srt -o meeting.srt
778
779# Diarized JSON (includes speakers list)
780./scripts/transcribe meeting.wav --diarize --format json
781```
782
783Speakers are labeled `SPEAKER_1`, `SPEAKER_2`, etc. in order of first appearance. Diarization runs on GPU automatically if CUDA is available.
784
785## Precise Word Timestamps
786
787Whenever word-level timestamps are computed (`--word-timestamps`, `--diarize`, or `--min-confidence`), a wav2vec2 forced alignment pass automatically refines them from Whisper's ~100-200ms accuracy to ~10ms. No extra flag needed.
788
789```bash
790# Word timestamps with automatic wav2vec2 alignment
791./scripts/transcribe audio.mp3 --word-timestamps --format json
792
793# Diarization also gets precise alignment automatically
794./scripts/transcribe meeting.wav --diarize
795
796# Precise subtitles
797./scripts/transcribe audio.mp3 --word-timestamps --format srt -o subtitles.srt
798```
799
800Uses the MMS (Massively Multilingual Speech) model from torchaudio — supports 1000+ languages. The model is cached after first load, so batch processing stays fast.
801
802## URL & YouTube Input
803
804Pass any URL as input — audio is downloaded automatically via yt-dlp:
805
806```bash
807# YouTube video
808./scripts/transcribe https://youtube.com/watch?v=dQw4w9WgXcQ
809
810# Direct audio URL
811./scripts/transcribe https://example.com/podcast.mp3
812
813# With options
814./scripts/transcribe https://youtube.com/watch?v=... --language en --format srt -o subs.srt
815```
816
817Requires `yt-dlp` (checks PATH and `~/.local/share/pipx/venvs/yt-dlp/bin/yt-dlp`).
818
819## Batch Processing
820
821Process multiple files at once with glob patterns, directories, or multiple paths:
822
823```bash
824# All MP3s in current directory
825./scripts/transcribe *.mp3
826
827# Entire directory (auto-filters audio files)
828./scripts/transcribe ./recordings/
829
830# Output to directory (one file per input)
831./scripts/transcribe *.mp3 -o ./transcripts/
832
833# Skip already-transcribed files (resume interrupted batch)
834./scripts/transcribe *.mp3 --skip-existing -o ./transcripts/
835
836# Mixed inputs
837./scripts/transcribe file1.mp3 file2.wav ./more-recordings/
838
839# Batch SRT subtitles
840./scripts/transcribe *.mp3 --format srt -o ./subtitles/
841```
842
843When outputting to a directory, files are named `{input-stem}.{ext}` (e.g., `audio.mp3` → `audio.srt`).
844
845Batch mode prints a summary after all files complete:
846
847```
848📊 Done: 12 files, 3h24m audio in 10m15s (19.9× realtime)
849```
850
851## Workflows
852
853End-to-end pipelines for common use cases.
854
855### Podcast Transcription Pipeline
856
857Fetch and transcribe the latest 5 episodes from any podcast RSS feed:
858
859```bash
860# Transcribe latest 5 episodes → one .txt per episode
861./scripts/transcribe --rss https://feeds.megaphone.fm/mypodcast -o ./transcripts/
862
863# All episodes, as SRT subtitles
864./scripts/transcribe --rss https://... --rss-latest 0 --format srt -o ./subtitles/
865
866# Skip already-done episodes (safe to re-run)
867./scripts/transcribe --rss https://... --skip-existing -o ./transcripts/
868
869# With diarization (who said what) + retry on flaky network
870./scripts/transcribe --rss https://... --diarize --retries 2 -o ./transcripts/
871```
872
873### Meeting Notes Pipeline
874
875Transcribe a meeting recording with speaker labels, then output clean text:
876
877```bash
878# Diarize + name speakers (replace SPEAKER_1/2 with real names)
879./scripts/transcribe meeting.wav --diarize --speaker-names "Alice,Bob" -o meeting.txt
880
881# Diarized JSON for post-processing (summaries, action items)
882./scripts/transcribe meeting.wav --diarize --format json -o meeting.json
883
884# Stream live while it transcribes (long meetings)
885./scripts/transcribe meeting.wav --stream
886```
887
888### Video Subtitle Pipeline
889
890Generate ready-to-use subtitles for a video file:
891
892```bash
893# SRT subtitles with sentence merging (better readability)
894./scripts/transcribe video.mp4 --format srt --merge-sentences -o subtitles.srt
895
896# Burn subtitles directly into the video
897./scripts/transcribe video.mp4 --format srt --burn-in video_subtitled.mp4
898
899# Word-level SRT (karaoke-style), capped at 8 words per cue
900./scripts/transcribe video.mp4 --format srt --word-timestamps --max-words-per-line 8 -o subs.srt
901```
902
903### YouTube Batch Pipeline
904
905Transcribe multiple YouTube videos at once:
906
907```bash
908# One-liner: transcribe a playlist video + output SRT
909./scripts/transcribe "https://youtube.com/watch?v=abc123" --format srt -o subs.srt
910
911# Batch from a text file of URLs (one per line)
912cat urls.txt | xargs ./scripts/transcribe -o ./transcripts/
913
914# Download audio first, then transcribe (for re-use without re-downloading)
915./scripts/transcribe https://youtube.com/watch?v=abc123 --keep-temp
916```
917
918### Noisy Audio Pipeline
919
920Clean up poor-quality recordings before transcribing:
921
922```bash
923# Denoise + normalize, then transcribe
924./scripts/transcribe interview.mp3 --denoise --normalize -o interview.txt
925
926# Noisy batch with aggressive hallucination filtering
927./scripts/transcribe *.mp3 --denoise --filter-hallucinations -o ./out/
928```
929
930### Batch Recovery Pipeline
931
932Process a large folder with retries — safe to re-run after failures:
933
934```bash
935# Retry each failed file up to 3 times, skip already-done
936./scripts/transcribe ./recordings/ --skip-existing --retries 3 -o ./transcripts/
937
938# Check what failed (printed in batch summary at the end)
939# Re-run the same command — skips successes, retries failures
940```
941
942## Server Mode (OpenAI-Compatible API)
943
944[speaches](https://github.com/speaches-ai/speaches) runs faster-whisper as an OpenAI-compatible `/v1/audio/transcriptions` endpoint — drop-in replacement for OpenAI Whisper API with streaming, Docker support, and live transcription.
945
946### Quick start (Docker)
947
948```bash
949docker run --gpus all -p 8000:8000 ghcr.io/speaches-ai/speaches:latest-cuda
950```
951
952### Test it
953
954```bash
955# Transcribe a file via the API (same format as OpenAI)
956curl http://localhost:8000/v1/audio/transcriptions \
957 -F file=@audio.mp3 \
958 -F model=Systran/faster-whisper-large-v3
959```
960
961### Use with any OpenAI SDK
962
963```python
964from openai import OpenAI
965client = OpenAI(base_url="http://localhost:8000", api_key="none")
966with open("audio.mp3", "rb") as f:
967 result = client.audio.transcriptions.create(model="Systran/faster-whisper-large-v3", file=f)
968print(result.text)
969```
970
971Useful when you want to expose transcription as a local API for other tools (Home Assistant, n8n, custom apps).
972
973## Common Mistakes
974
975| Mistake | Problem | Solution |
976| --------------------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------- |
977| **Using CPU when GPU available** | 10-20x slower transcription | Check `nvidia-smi`; verify CUDA installation |
978| **Not specifying language** | Wastes time auto-detecting on known content | Use `--language en` when you know the language |
979| **Using wrong model** | Unnecessary slowness or poor accuracy | Default `distil-large-v3.5` is excellent; only use `large-v3` if accuracy issues |
980| **Ignoring distilled models** | Missing 6x speedup with <1% accuracy loss | Try `distil-large-v3.5` before reaching for standard models |
981| **Forgetting ffmpeg** | Setup fails or audio can't be processed | Setup script handles this; manual installs need ffmpeg separately |
982| **Out of memory errors** | Model too large for available VRAM/RAM | Use smaller model, `--compute-type int8`, or `--batch-size 4` |
983| **Over-engineering beam size** | Diminishing returns past beam-size 5-7 | Default 5 is fine; try 10 for critical transcripts |
984| **--diarize without pyannote** | Import error at runtime | Run `setup.sh --diarize` first |
985| **--diarize without HuggingFace token** | Model download fails | Run `huggingface-cli login` and accept model agreements |
986| **URL input without yt-dlp** | Download fails | Install: `pipx install yt-dlp` |
987| **--min-confidence too high** | Drops good segments with natural pauses | Start at 0.5, adjust up; check JSON output for probabilities |
988| **Using --word-timestamps for basic transcription** | Adds ~5-10s overhead for negligible benefit | Only use when word-level precision matters |
989| **Batch without -o directory** | All output mixed in stdout | Use `-o ./transcripts/` to write one file per input |
990
991## Performance Notes
992
993- **First run**: Downloads model to `~/.cache/huggingface/` (one-time)
994- **Batched inference**: Enabled by default via `BatchedInferencePipeline` — ~3x faster than standard mode; VAD on by default
995- **GPU**: Automatically uses CUDA if available
996- **Quantization**: INT8 used on CPU for ~4x speedup with minimal accuracy loss
997- **Performance stats**: Every transcription shows audio duration, processing time, and realtime factor
998- **Benchmark** (RTX 3070, 21-min file): **~24s** with batched inference (both distil-large-v3 and v3.5) vs ~69s without
999- **--precise overhead**: Adds ~5-10s for wav2vec2 model load + alignment (model cached for batch)
1000- **Diarization overhead**: Adds ~10-30s depending on audio length (runs on GPU if available)
1001- **Memory**:
1002 - `distil-large-v3`: ~2GB RAM / ~1GB VRAM
1003 - `large-v3-turbo`: ~4GB RAM / ~2GB VRAM
1004 - `tiny/base`: <1GB RAM
1005 - Diarization: additional ~1-2GB VRAM
1006- **OOM**: Lower `--batch-size` (try 4) if you hit out-of-memory errors
1007- **Pre-convert to WAV** (optional): `ffmpeg -i input.mp3 -ar 16000 -ac 1 input.wav` converts to 16kHz mono WAV before transcription. Benefit is minimal (~5%) for one-off use since PyAV decodes efficiently — most useful when re-processing the same file multiple times (research/experiments) or when a format causes PyAV decode issues. Note: `--normalize` and `--denoise` already perform this conversion automatically.
1008- **Silero VAD V6**: faster-whisper 1.2.1 upgraded to Silero VAD V6 (improved speech detection). Run `./setup.sh --update` to get it.
1009- **Batched silence removal**: faster-whisper 1.2.0+ automatically removes silence in `BatchedInferencePipeline` (used by default). Upgrade with `./setup.sh --update` to get this if you installed before August 2024.
1010
1011## Why faster-whisper?
1012
1013- **Speed**: ~4-6x faster than OpenAI's original Whisper
1014- **Accuracy**: Identical (uses same model weights)
1015- **Efficiency**: Lower memory usage via quantization
1016- **Production-ready**: Stable C++ backend (CTranslate2)
1017- **Distilled models**: ~6x faster with <1% accuracy loss
1018- **Subtitles**: Native SRT/VTT/HTML output
1019- **Precise alignment**: Automatic wav2vec2 refinement (~10ms word boundaries)
1020- **Diarization**: Optional speaker identification via pyannote; `--speaker-names` maps to real names
1021- **URLs**: Direct YouTube/URL input; `--keep-temp` preserves downloads for re-use
1022- **Custom models**: Load local CTranslate2 dirs or HuggingFace repos; `--model-dir` controls cache
1023- **Quality control**: `--filter-hallucinations` strips music/applause markers and duplicates
1024- **Parallel batch**: `--parallel N` for multi-threaded batch processing
1025- **Subtitle burn-in**: `--burn-in` overlays subtitles directly into video via ffmpeg
1026
1027### v1.5.0 New Features
1028
1029**Multi-format output:**
1030
1031- `--format srt,text` — write multiple formats in one pass (e.g. SRT + plain text simultaneously)
1032- Comma-separated list accepted: `srt,vtt,json`, `srt,text`, etc.
1033- Requires `-o <dir>` when writing multiple formats; single format unchanged
1034
1035**Filler word removal:**
1036
1037- `--clean-filler` — strip hesitation sounds (um, uh, er, ah, hmm, hm) and discourse markers
1038 (you know, I mean, you see) from transcript text; off by default
1039- Conservative regex matching at word boundaries to avoid false positives
1040- Segments that become empty after cleaning are dropped automatically
1041
1042**Stereo channel selection:**
1043
1044- `--channel left|right|mix` — extract a specific stereo channel before transcribing (default: mix)
1045- Useful for dual-track recordings (interviewer on left, interviewee on right)
1046- Uses ffmpeg pan filter; falls back gracefully to full mix if ffmpeg not found
1047
1048**Character-based subtitle wrapping:**
1049
1050- `--max-chars-per-line N` — split subtitle cues so each line fits within N characters
1051- Works for SRT, VTT, ASS, and TTML formats; takes priority over `--max-words-per-line`
1052- Requires word-level timestamps; falls back to full segment if no word data
1053
1054**Paragraph detection:**
1055
1056- `--detect-paragraphs` — insert `\n\n` paragraph breaks in text output at natural boundaries
1057- `--paragraph-gap SEC` — minimum silence gap for a paragraph (default: 3.0s)
1058- Also detects paragraph breaks when the previous segment ends a sentence and gap ≥ 1.5s
1059
1060**Subtitle formats:**
1061
1062- `--format ass` — Advanced SubStation Alpha (Aegisub, VLC, mpv, MPC-HC)
1063- `--format lrc` — Timed lyrics format for music players
1064- `--format html` — Confidence-colored HTML transcript (green/yellow/red per word)
1065- `--format ttml` — W3C TTML 1.0 (DFXP) broadcast standard (Netflix, Amazon Prime, BBC)
1066- `--format csv` — Spreadsheet-ready CSV with header row; RFC 4180 quoting; `speaker` column when diarized
1067
1068**Transcript tools:**
1069
1070- `--search TERM` — Find all timestamps where a word/phrase appears; replaces normal output; `-o` to save
1071- `--search-fuzzy` — Approximate/partial matching with `--search`
1072- `--detect-chapters` — Auto-detect chapter breaks from silence gaps; `--chapter-gap SEC` (default 8s)
1073- `--chapters-file PATH` — Write chapters to file instead of stdout; `--chapter-format youtube|text|json`
1074- `--export-speakers DIR` — After `--diarize`, save each speaker's turns as separate WAV files via ffmpeg
1075
1076**Batch improvements:**
1077
1078- **ETA** — `[N/total] filename | ETA: Xm Ys` shown before each file in sequential batch; no flag needed
1079- `--language-map "pat=lang,..."` — Per-file language override; fnmatch glob patterns; `@file.json` form
1080- `--retries N` — Retry failed files with exponential backoff; failed-file summary at end
1081- `--rss URL` — Transcribe podcast RSS feeds; `--rss-latest N` for episode count
1082- `--skip-existing` / `--parallel N` / `--output-template` / `--stats-file` / `--merge-sentences`
1083
1084**Model & inference:**
1085
1086- `distil-large-v3.5` default (replaced distil-large-v3)
1087- Auto-disables `condition_on_previous_text` for distil models (prevents repetition loops)
1088- `--condition-on-previous-text` to override; `--log-level` for library debug output
1089- `--model-dir PATH` — Custom HuggingFace cache dir; local CTranslate2 model support
1090- `--no-timestamps`, `--chunk-length`, `--length-penalty`, `--repetition-penalty`, `--no-repeat-ngram-size`
1091- `--clip-timestamps`, `--stream`, `--progress`, `--best-of`, `--patience`, `--max-new-tokens`
1092- `--hotwords`, `--prefix`, `--revision`, `--suppress-tokens`, `--max-initial-timestamp`
1093
1094**Speaker & quality:**
1095
1096- `--speaker-names "Alice,Bob"` — Replace SPEAKER_1/2 with real names (requires `--diarize`)
1097- `--filter-hallucinations` — Remove music/applause markers, duplicates, "Thank you for watching"
1098- `--burn-in OUTPUT` — Burn subtitles into video via ffmpeg
1099- `--keep-temp` — Preserve URL-downloaded audio for re-processing
1100
1101**Setup:**
1102
1103- `setup.sh --check` — System diagnostic: GPU, CUDA, Python, ffmpeg, pyannote, HuggingFace token (completes in ~12s)
1104- ffmpeg no longer required for basic transcription (PyAV handles decoding); `skill.json` updated to reflect this (`ffmpeg` is now `optionalBins`)
1105
1106## Troubleshooting
1107
1108**"CUDA not available — using CPU"**: Install PyTorch with CUDA (see GPU Support above)
1109**Setup fails**: Make sure Python 3.10+ is installed
1110**Out of memory**: Use smaller model, `--compute-type int8`, or `--batch-size 4`
1111**Slow on CPU**: Expected — use GPU for practical transcription
1112**Model download fails**: Check `~/.cache/huggingface/` permissions
1113**Diarization model fails**: Ensure HuggingFace token exists and model agreements accepted;
1114or pass token directly with `--hf-token hf_xxx`
1115**URL download fails**: Check yt-dlp is installed (`pipx install yt-dlp`)
1116**No audio files in batch**: Check file extensions match supported formats
1117**Check installed version**: Run `./scripts/transcribe --version`
1118**Upgrade faster-whisper**: Run `./setup.sh --update` (upgrades in-place, no full reinstall)
1119**Hallucinations on silence/music**: Try `--temperature 0.0 --no-speech-threshold 0.8`
1120**VAD splits speech incorrectly**: Tune with `--vad-threshold 0.3` (lower) or `--min-silence-duration 300`
1121**Improve speech detection**: Run `./setup.sh --update` to upgrade faster-whisper to the latest version (includes Silero VAD V6).
1122
1123## References
1124
1125- [faster-whisper GitHub](https://github.com/SYSTRAN/faster-whisper)
1126- [Distil-Whisper Paper](https://arxiv.org/abs/2311.00430)
1127- [HuggingFace Models](https://huggingface.co/collections/Systran/faster-whisper)
1128- [pyannote.audio](https://github.com/pyannote/pyannote-audio) (diarization)
1129- [yt-dlp](https://github.com/yt-dlp/yt-dlp) (URL/YouTube download)