youtube-transcription
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "youtube-transcription" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-690516427873d855c7147f2968c42a53b0da7eb374b1602f777e2348200263ba. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Transcribe YouTube videos to text using OpenAI Whisper and yt-dlp. Suitable for extracting subtitles from YouTube videos, converting speech to text, generating SRT/VTT subtitle files, or extracting audio content from a YouTube link.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Inputs and outputs
- whisper audio.wav --model medium --output_format srt
- Testing
- Not tested
Browse files
Frontmatter
name: youtube-transcription
description: >-
Transcribe YouTube videos to text using OpenAI Whisper and yt-dlp. Use when
the user wants to get a transcript from a YouTube video, generate subtitles,
convert video speech to text, create SRT/VTT captions, or extract spoken
content from YouTube URLs.
license: Apache-2.0
compatibility: >-
Requires Python 3.8+, ffmpeg, and CUDA GPU recommended for large models.
Install: pip install openai-whisper yt-dlp. CPU works but is slower.
metadata:
author: terminal-skills
version: "1.0.0"
category: content
tags: [youtube, transcription, whisper, subtitles, speech-to-text]YouTube Video Transcription
Transcribe YouTube videos to text using OpenAI Whisper and yt-dlp.
Overview
This skill downloads audio from YouTube videos using yt-dlp and transcribes it using OpenAI's Whisper model. Supports multiple output formats (txt, srt, vtt, json) and various model sizes for different accuracy/speed tradeoffs.
Instructions
1. Install dependencies
# Install whisper and yt-dlp
pip install openai-whisper yt-dlp
# Verify ffmpeg is installed (required for audio processing)
ffmpeg -version
If ffmpeg is missing:
- macOS:
brew install ffmpeg - Ubuntu/Debian:
sudo apt install ffmpeg - Windows: Download from https://ffmpeg.org/download.html
2. Download audio from YouTube
# Download best audio quality as WAV
yt-dlp -x --audio-format wav -o "%(title)s.%(ext)s" "YOUTUBE_URL"
# Download as MP3 (smaller file)
yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" "YOUTUBE_URL"
# Download with video ID as filename (safer for special characters)
yt-dlp -x --audio-format wav -o "%(id)s.%(ext)s" "YOUTUBE_URL"
3. Choose Whisper model
| Model | Parameters | VRAM | Relative Speed | Use Case |
|---|---|---|---|---|
| tiny | 39M | ~1 GB | ~32x | Quick drafts, testing |
| base | 74M | ~1 GB | ~16x | Fast transcription |
| small | 244M | ~2 GB | ~6x | Good balance |
| medium | 769M | ~5 GB | ~2x | High accuracy |
| large | 1550M | ~10 GB | 1x | Best accuracy |
English-only models (tiny.en, base.en, small.en, medium.en) are faster for English content.
4. Run transcription
CLI approach:
# Basic transcription (auto-detect language)
whisper audio.wav --model medium
# Specify language for better accuracy
whisper audio.wav --model medium --language en
# Output specific format
whisper audio.wav --model medium --output_format srt
# All formats at once
whisper audio.wav --model medium --output_format all
# Specify output directory
whisper audio.wav --model medium --output_dir ./transcripts
Python approach:
import whisper
# Load model (downloads on first run)
model = whisper.load_model("medium")
# Transcribe
result = model.transcribe("audio.wav", language="en")
# Get plain text
print(result["text"])
# Get segments with timestamps
for segment in result["segments"]:
print(f"[{segment['start']:.2f} - {segment['end']:.2f}] {segment['text']}")
5. One-liner pipeline
Combine download and transcription:
# Download and transcribe in one command
yt-dlp -x --audio-format wav -o "audio.wav" "YOUTUBE_URL" && whisper audio.wav --model medium --output_format all
6. Alternative: yt-whisper tool
For simpler workflow, use the dedicated yt-whisper package:
# Install
pip install git+https://github.com/m1guelpf/yt-whisper.git
# Transcribe directly from URL
yt_whisper "https://www.youtube.com/watch?v=VIDEO_ID"
# With options
yt_whisper "YOUTUBE_URL" --model medium --language en --output_format srt
Output Formats
| Format | Extension | Description |
|---|---|---|
| txt | .txt | Plain text transcript |
| srt | .srt | SubRip subtitle format (with timestamps) |
| vtt | .vtt | WebVTT subtitle format |
| tsv | .tsv | Tab-separated values |
| json | .json | Full data with word-level timestamps |
Examples
<example> User: Transcribe this YouTube video to text Steps:
- yt-dlp -x --audio-format wav -o "video.wav" "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
- whisper video.wav --model medium --language en --output_format txt Output: video.txt with full transcript </example>
<example> User: Generate SRT subtitles for a YouTube lecture Steps:
- yt-dlp -x --audio-format wav -o "lecture.wav" "https://www.youtube.com/watch?v=LECTURE_ID"
- whisper lecture.wav --model medium --output_format srt Output: lecture.srt with timestamped subtitles </example>
<example> User: Transcribe a Spanish YouTube video Steps:
- yt-dlp -x --audio-format wav -o "spanish.wav" "https://www.youtube.com/watch?v=VIDEO_ID"
- whisper spanish.wav --model medium --language es --output_format all Output: spanish.txt, spanish.srt, spanish.vtt, spanish.json </example>
<example> User: Quick transcription of a short video (speed over accuracy) Command: yt-dlp -x --audio-format mp3 -o "quick.mp3" "URL" && whisper quick.mp3 --model tiny.en </example>
<example> User: Get transcript with timestamps in Python
import whisper
model = whisper.load_model("medium")
result = model.transcribe("audio.wav")
for seg in result["segments"]:
print(f"[{seg['start']:.1f}s] {seg['text']}")
</example>
Guidelines
- Use
--languageflag when you know the spoken language for significantly better accuracy - For long videos (>1 hour), use
smallormediummodel to balance speed and accuracy - English-only models (
.ensuffix) are faster and more accurate for English content - GPU with CUDA dramatically speeds up transcription; CPU works but is 5-10x slower
- If transcription fails, ensure ffmpeg is properly installed and in PATH
- For videos with background music, larger models (medium/large) handle it better
- Clean up audio files after transcription to save disk space
- Use
--output_format allto get every format at once, then choose what you need
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 YouTube 视频转录这一明确且高频的用户需求
- 支持多种输出格式(txt/srt/vtt/json),满足不同使用场景
- 提供 CLI 和 Python 两种使用方式,覆盖广泛用户群体
Highlights
- description 清晰完整,覆盖转录、字幕生成、语音提取等多种场景
- 触发词具体明确(YouTube, transcribe, subtitles, SRT, VTT)
- 边界清晰,不易与其他 Skill 混淆
Highlights
- 步骤划分清晰(安装→下载→模型选择→转录→管道→替代方案)
- 提供 5 个完整端到端示例,覆盖不同语言和场景
- frontmatter 完整,含兼容性说明和元数据
Highlights
- 工具来源明确(OpenAI Whisper, yt-dlp, ffmpeg)
- 覆盖主要异常情况(ffmpeg 缺失、语言指定、模型选择)
- 提供 GPU/CPU 性能说明,用户预期管理良好
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 11, 33, 40, 41, 120 -
Administrator or elevated privileges
Elevate only when necessary. Keep protection and certificate validation enabled and avoid broad system access.
Mentioned in main document · lines 41
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- ffmpeg.org
- github.com
- www.youtube.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.