Install
openclaw skills install @bccbok/video-no-subtitle-transcribe无字幕视频转写兜底方案。当视频(YouTube/Bilibili 等)没有字幕、字幕接口被禁或拉取失败时,用 yt-dlp 下载音频 + faster-whisper 本地转写,输出带时间戳的完整文稿。触发词:视频没字幕、转写视频、字幕被禁、whisper 转写、提取语音内容。
openclaw skills install @bccbok/video-no-subtitle-transcribeWhen subtitle-based approaches (e.g. bilibili-youtube-watcher) fail — video has no CC/auto-generated subtitles, or the subtitle endpoint is disabled by YouTube ("Subtitles are disabled for this video") — use this skill: download audio → local speech recognition → timestamped transcript.
yt-dlp (pip install yt-dlp or brew install yt-dlp)faster-whisper (pip install faster-whisper)ffmpeg (system package)~/.local/share/whisper-small/model.bin (auto-downloaded from ModelScope if missing, ~483MB)python3 {baseDir}/scripts/transcribe_video.py "<URL>" --lang zh --out /tmp/transcript.txt
Arguments:
--lang: language code, zh for Chinese, en for English (default zh)--out: output file path (default transcript.txt)--proxy: proxy URL, e.g. http://127.0.0.1:7890 (default: env vars HTTPS_PROXY/HTTP_PROXY, then OpenClaw config)Output format: one line per segment, [start-end seconds] text, e.g. [2.0-4.0] Hello everyone, welcome to today's session
Use this only when the script reports [dl] FAILED; do not send a video link to a third-party downloader before trying the local yt-dlp path.
https://youtube.iiilab.com/ in the browser.python3 {baseDir}/scripts/transcribe_video.py "<LOCAL_AUDIO_OR_VIDEO_FILE>" --lang zh --out /tmp/transcript.txt
Privacy note: This fallback submits the source URL to youtube.iiilab.com, a third-party service. Tell the user before using it for private, unlisted, sensitive, or client-owned videos. Do not use it for non-YouTube URLs; report the yt-dlp failure instead.
YouTube's default client gets 429/bot-checked ("Sign in to confirm you're not a bot") → try audio clients in order: tv_embedded (most reliable, bypasses DRM/SABR experiments, verified) → android → ios → default. The Android client may hit the SABR-only experiment (formats without URLs) — normal, just try the next client.
Use the ModelScope CN mirror for model download (~1MB/s): https://modelscope.cn/models/Systran/faster-whisper-small/resolve/master/model.bin. Don't use HuggingFace direct (very slow from China via proxy, ~90KB/s), and don't use the hf-mirror endpoint (its xet protocol silently corrupts files).
Verify model integrity: the intact file is exactly 483546902 bytes. If it doesn't match, delete and re-download; if whisper errors with File model.bin is incomplete: failed to read a buffer... the file is corrupt. Don't use a fixed size as the "done" signal — let the request finish naturally and verify the byte count.
Proxy: YouTube requires a proxy (mainland China); ModelScope direct access needs no proxy. Proxy priority: --proxy argument > env vars > OpenClaw config.
Transcription params: WhisperModel(dir, device='cpu', compute_type='int8') + transcribe(audio, language=lang, vad_filter=True). Speed is roughly 0.5–1x realtime (1-hour audio takes ~30–60 min). Be patient, don't kill the process early.
Homophone typos (e.g. 在/再, 做/作 confusion) are normal for whisper small — restore by context when summarizing.
MIT