Youtube Transcriber
by @edisonchenai
One-command YouTube video transcription. Automatically downloads audio and transcribes using OpenAI Whisper API — works even when YouTube subtitles are disab...
clawhub install youtube-transcriber📖 About This Skill
name: youtube-transcriber description: One-command YouTube video transcription. Automatically downloads audio and transcribes using OpenAI Whisper API — works even when YouTube subtitles are disabled. Use when asked to "transcribe this video", "get transcript", "what does this video say", or when YouTube captions are unavailable.
YouTube Transcriber
One-command transcription for any YouTube video — even when subtitles are disabled.
How it works: 1. Tries to fetch existing YouTube subtitles first (free, instant) 2. If subtitles are disabled/unavailable → downloads audio → transcribes via OpenAI Whisper API
Prerequisites
yt-dlp — brew install yt-dlp or pip install yt-dlpffmpeg — brew install ffmpegOPENAI_API_KEY environment variable setUsage
# Basic — auto-detect best method
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID"Specify language (improves accuracy for non-English)
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --lang zhCustom output path
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --out /tmp/transcript.txtForce Whisper (skip subtitle check)
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --force-whisperKeep downloaded audio file
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --keep-audio
Options
| Option | Description | Default |
|--------|-------------|---------|
| --lang | Language hint (ISO 639-1: en, zh, ja, ko, etc.) | auto-detect |
| --out | Output transcript file path | /tmp/yt_transcript_ |
| --force-whisper | Skip subtitle check, always use Whisper API | off |
| --keep-audio | Keep the downloaded audio file after transcription | off (deletes audio) |
| --audio-bitrate | Audio compression bitrate | 64 |
How It Works
YouTube URL
│
├─► Try yt-dlp subtitles (free, instant)
│ │
│ ├─ Found → Clean & output transcript ✓
│ │
│ └─ Not found / disabled
│ │
│ ▼
└─► Download audio (yt-dlp + ffmpeg)
│
├─ Compress to mono, low bitrate (fit 25MB API limit)
│
▼
OpenAI Whisper API → transcript ✓
Cost
Supported
Troubleshooting
pip install -U yt-dlp)--audio-bitrate 32OPENAI_API_KEY environment variable💡 Examples
# Basic — auto-detect best method
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID"Specify language (improves accuracy for non-English)
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --lang zhCustom output path
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --out /tmp/transcript.txtForce Whisper (skip subtitle check)
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --force-whisperKeep downloaded audio file
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --keep-audio
⚙️ Configuration
| Option | Description | Default |
|--------|-------------|---------|
| --lang | Language hint (ISO 639-1: en, zh, ja, ko, etc.) | auto-detect |
| --out | Output transcript file path | /tmp/yt_transcript_ |
| --force-whisper | Skip subtitle check, always use Whisper API | off |
| --keep-audio | Keep the downloaded audio file after transcription | off (deletes audio) |
| --audio-bitrate | Audio compression bitrate | 64 |
📋 Tips & Best Practices
pip install -U yt-dlp)--audio-bitrate 32OPENAI_API_KEY environment variable