播客全流程自动化——下载、抓取、转录、Sonos播放、飞书Wiki归档。用户请求下载播客、转录音频、在Sonos播放或归档笔记时使用。
Podcast Automation是一项面向实际任务的技能,主要用于一站式播客自动化技能,覆盖 抓取 → 转录 → Sonos 播放 → 飞书 Wiki 归档 全流程;curl / yt-dlp;
本地语音转录;pip install openai-whisper;sonos;Sonos 音箱控制;go install。它将相关步骤、工具调用和结果整理方式集中到统一流程中,帮助使用者更快完成目标并减少重复操作。
从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。该技能适合用于一次性任务,也可以接入自动化工作流,与其他技能或上层代理配合完成更完整的业务链路;在组合使用时,应明确每一步的输入输出关系,并避免不同步骤之间出现参数冲突。
一站式播客自动化技能,覆盖 抓取 → 转录 → Sonos 播放 → 飞书 Wiki 归档 全流程。
| 依赖 | 用途 | 安装 |
|---|---|---|
curl / yt-dlp |
下载播客音频 | pip install yt-dlp(可选,curl 可处理直链) |
whisper |
本地语音转录 | pip install openai-whisper |
sonos |
Sonos 音箱控制 | go install github.com/steipete/sonoscli/cmd/sonos@latest |
| 飞书自建应用 | Wiki 归档 | 需开通 wiki:wiki 权限,配置 FEISHU_APP_ID / FEISHU_APP_SECRET |
curl -L -o /tmp/podcast.mp3 "https://example.com/episode.mp3"
# 解析 RSS 获取最新一期音频 URL
AUDIO_URL=$(curl -s "https://feeds.example.com/podcast.rss"
| python3 -c "
import sys, xml.etree.ElementTree as ET
root = ET.fromstring(sys.stdin.read())
ns = {'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd'}
enc = root.find('.//item/enclosure')
print(enc.get('url') if enc is not None else '')
")
curl -L -o /tmp/podcast.mp3 "$AUDIO_URL"
yt-dlp -x --audio-format mp3 -o "/tmp/podcast.%(ext)s" "https://www.youtube.com/watch?v=XXX"
whisper /tmp/podcast.mp3 --model medium --output_format txt --output_dir /tmp/podcast-out # 转录结果: /tmp/podcast-out/podcast.txt
--model turbo:速度优先--model medium:平衡--model large:精度优先--task translate:翻译为英文# 发现音箱 sonos discover # 播放本地或网络音频 sonos play --name "Kitchen" "https://example.com/episode.mp3" # 音量控制 sonos volume set 20 --name "Kitchen"
如遇
no route to host,确认本地网络权限(macOS 需在隐私设置开启 Local Network)。
TOKEN=$(curl -s -X POST
'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal'
-H 'Content-Type: application/json'
-d "{"app_id":"$FEISHU_APP_ID","app_secret":"$FEISHU_APP_SECRET"}"
| python3 -c "import sys,json; print(json.load(sys.stdin)['tenant_access_token'])")
SPACE_ID="your_space_id"
RESULT=$(curl -s -X POST
"https://open.feishu.cn/open-apis/wiki/v2/spaces/$SPACE_ID/nodes"
-H "Authorization: Bearer $TOKEN"
-H 'Content-Type: application/json'
-d "{"obj_type":"docx","node_type":"origin","title":"播客笔记: Episode Title"}")
OBJ_TOKEN=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['node']['obj_token'])")
TRANSCRIPT=$(cat /tmp/podcast-out/podcast.txt)
curl -s -X POST
"https://open.feishu.cn/open-apis/docx/v1/documents/$OBJ_TOKEN/blocks/$OBJ_TOKEN/children"
-H "Authorization: Bearer $TOKEN"
-H 'Content-Type: application/json'
-d "{"children":[{"block_type":2,"text":{"elements":[{"text_run":{"content":"$TRANSCRIPT"}}]}}],"index":0}"
# 1. 抓取 curl -L -o /tmp/podcast.mp3 "https://cdn.example.com/ep42.mp3" # 2. 转录 whisper /tmp/podcast.mp3 --model medium --output_format txt --output_dir /tmp/podcast-out # 3. Sonos 播放 sonos play --name "Living Room" "https://cdn.example.com/ep42.mp3" # 4. 归档到飞书 Wiki bash references/scripts/archive-to-wiki.sh --title "EP42: AI与未来" --transcript /tmp/podcast-out/podcast.txt --space-id "$FEISHU_SPACE_ID"
| 变量 | 说明 | 必填 |
|---|---|---|
FEISHU_APP_ID |
飞书自建应用 App ID | 归档时必填 |
FEISHU_APP_SECRET |
飞书自建应用 App Secret | 归档时必填 |
FEISHU_SPACE_ID |
默认归档 Wiki 空间 ID | 归档时必填 |
相关专题
热门下载
相关下载
精品课程
共6课时 | 54.7万人学习
共89课时 | 134.1万人学习
共49课时 | 82.6万人学习
最新文章