YouTube Channel Monitor (AssemblyAI)
Monitor YouTube channels and auto-transcribe new videos using AssemblyAI cloud API. Zero local dependencies beyond requests.
Prerequisites
- 1. AssemblyAI account: https://www.assemblyai.com/app/signup (free, 100 hours/month)
- API Key: from Dashboard
requests library (usually pre-installed with OpenClaw/Python)
Setup API Key
Choose one:
CODEBLOCK0
How It Works
CODEBLOCK1
No local audio download, no Whisper, no ffmpeg. AssemblyAI handles everything server-side.
Commands
CODEBLOCK2
Important Notes
- - Audio URL extraction uses YouTube's innertube API (pure requests).
- Works on normal residential IPs. Datacenter IPs may get blocked by YouTube.
- If audio URL extraction fails with UNPLAYABLE, the IP may be flagged — this is a YouTube limitation, not a bug.
- Free tier: 100 hours/month of transcription.
- Transcription takes ~70-80% of video duration.
- Results saved to
data/summaries/{video_id}.json.
Output Format
Each result includes:
- -
text: full transcription - INLINECODE4 : AI-generated paragraph summary
- INLINECODE5 : transcription confidence score
- INLINECODE6 : timestamped segments with speaker labels
Files
| Path | Purpose |
|---|
| INLINECODE7 | monitored channels |
| INLINECODE8 |
already-transcribed video IDs |
|
data/summaries/*.json | transcription results |
|
data/config.json | API key (optional) |
YouTube频道监控器 (AssemblyAI)
监控YouTube频道,并使用AssemblyAI云API自动转录新视频。除requests外,无需本地依赖。
前置条件
- 1. AssemblyAI账户:https://www.assemblyai.com/app/signup(免费,每月100小时)
- API密钥:从控制面板获取
- requests 库(通常随OpenClaw/Python预装)
设置API密钥
选择以下任一方式:
bash
选项A:环境变量
export ASSEMBLYAI
APIKEY=your-key
选项B:配置文件
echo {api_key: your-key} > data/config.json
工作原理
频道页面 → innertube API → 音频直链 → AssemblyAI云 → 文本+摘要
无需本地音频下载,无需Whisper,无需ffmpeg。AssemblyAI在服务端处理所有操作。
命令
bash
转录单个视频
python3 scripts/monitor.py now https://www.youtube.com/watch?v=VIDEO_ID
添加要监控的频道
python3 scripts/monitor.py add https://www.youtube.com/@ChannelName/videos 别名
检查所有频道的新视频并转录
python3 scripts/monitor.py check [每频道数量]
列出频道
python3 scripts/monitor.py list
移除频道
python3 scripts/monitor.py remove 别名
重要说明
- - 音频URL提取使用YouTube的innertube API(纯requests实现)。
- 适用于普通住宅IP。数据中心IP可能被YouTube屏蔽。
- 如果音频URL提取失败并显示UNPLAYABLE,说明该IP可能已被标记——这是YouTube的限制,而非程序错误。
- 免费套餐:每月100小时转录时长。
- 转录耗时约为视频时长的70-80%。
- 结果保存至data/summaries/{video_id}.json。
输出格式
每条结果包含:
- - text:完整转录文本
- summary:AI生成的段落摘要
- confidence:转录置信度分数
- utterances:带说话人标签的时间戳片段
文件
| 路径 | 用途 |
|---|
| data/channels.json | 已监控的频道 |
| data/processed.json |
已转录的视频ID |
| data/summaries/*.json | 转录结果 |
| data/config.json | API密钥(可选) |