← 返回
内容创作 Key 中文

Youtube Transcriber

One-command YouTube video transcription. Automatically downloads audio and transcribes using OpenAI Whisper API — works even when YouTube subtitles are disab...
一键转录YouTube视频。自动下载音频并调用OpenAI Whisper API转录,即使YouTube禁用字幕也能运行。
edisonchenai
内容创作 clawhub v1.0.0 1 版本 99857.5 Key: 需要
★ 0
Stars
📥 701
下载
💾 17
安装
1
版本
#latest

概述

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-dlpbrew install yt-dlp or pip install yt-dlp
  • ffmpegbrew install ffmpeg
  • OPENAI_API_KEY environment variable set

Usage

# 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 zh

# Custom output path
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --out /tmp/transcript.txt

# Force Whisper (skip subtitle check)
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --force-whisper

# Keep downloaded audio file
{baseDir}/scripts/transcribe.sh "https://www.youtube.com/watch?v=VIDEO_ID" --keep-audio

Options

OptionDescriptionDefault
------------------------------
--lang Language hint (ISO 639-1: en, zh, ja, ko, etc.)auto-detect
--out Output transcript file path/tmp/yt_transcript_.txt
--force-whisperSkip subtitle check, always use Whisper APIoff
--keep-audioKeep the downloaded audio file after transcriptionoff (deletes audio)
--audio-bitrate Audio compression bitrate64

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

  • With subtitles available: Free (uses existing captions)
  • Whisper API: ~$0.006/minute of audio → 23-min video ≈ $0.14

Supported

  • Any YouTube video URL (full URL, youtu.be short link, or video ID)
  • All languages supported by Whisper (99+ languages)
  • Videos up to ~4 hours (audio compressed to fit 25MB API limit)

Troubleshooting

  • 403 from YouTube: Update yt-dlp (pip install -U yt-dlp)
  • File too large for Whisper: Lower bitrate with --audio-bitrate 32
  • Missing API key: Set OPENAI_API_KEY environment variable

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 13:03 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,867
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,205
data-analysis

Edison Agent Reach

edisonchenai
Use the internet: search, read, and interact with 13+ platforms including Twitter/X, Reddit, YouTube, GitHub, Bilibili,
★ 0 📥 1,651