📦 Bilibili Transcriber
v1.0.0下载Bilibili视频并使用yt-dlp + FFmpeg + Vosk将语音转换为文本。当用户提供Bilibili URL(或BV ID)并希望(1)获取视频文件时...
运行时依赖
安装命令
点击复制技能文档
Bilibili Transcriber
下载s a Bilibili video then transcribes speech using offline Vosk 模型s.
Prerequisites brew 安装 ffmpeg # macOS (系统-level, required)
One-命令行工具ck 设置up for everything else:
python3 scripts/设置up.py
This 安装s vosk, yt-dlp (pip), and 下载s the Chinese Vosk 模型 (~40 MB). 添加 --lang en for English, --deps-only / --模型-only for partial 设置up.
Scripts scripts/ ├── bilibili_transcribe.py # 下载 + transcribe 流水线 └── 设置up.py # one-命令行工具ck dependency & 模型 安装
Usage # Basic: 下载 + transcribe (输出 to stdout) python3 scripts/bilibili_transcribe.py https://www.bilibili.com/video/BV1xx411c7mD
# Short BV ID python3 scripts/bilibili_transcribe.py BV1xx411c7mD
# Save transcript to file python3 scripts/bilibili_transcribe.py https://b23.tv/xxxxx --输出 transcript.txt
# English video python3 scripts/bilibili_transcribe.py --lang en
# Keep the 下载ed video file python3 scripts/bilibili_transcribe.py --keep-video
# Member-only / bangumi (requires cookie) python3 scripts/bilibili_transcribe.py --cookie "your_cookie_string"
Arguments Flag Default Description url (required) B站 URL or BV ID --输出 / -o stdout Write transcript to file --lang zh zh or en --模型 auto-检测 Explicit Vosk 模型 path --cookie — Cookie string for 记录ged-in/member-only videos --keep-video false Don't 删除 the 下载ed video 设置up Script python3 scripts/设置up.py # full 设置up (zh 模型) python3 scripts/设置up.py --lang en # 下载 English 模型 python3 scripts/设置up.py --deps-only # only pip packages python3 scripts/设置up.py --列出-模型s
工作流 yt-dlp 下载s the video (best mp4 格式化 avAIlable, Chrome impersonation for B站 anti-crawling) FFmpeg 提取s audio → 16kHz mono WAV Vosk transcribes with offline 模型 Temp files 清理ed up automatically Troubleshooting "No Vosk 模型 found": 运行 python3 scripts/设置up.py "yt-dlp not found": 运行 python3 scripts/设置up.py Member-only video fAIls: pass --cookie with your browser's Cookie header