Community研究与数据分析github.com

喜马拉雅·得到脑图转录

将喜马拉雅公开音频链接转换为得到脑记笔记的技能。

喜马拉雅·得到脑图转录 是什么?

该技能专为需要将喜马拉雅公开音频内容(如课程、播客)的结构化转录导入得到脑笔记的用户设计。它自动处理多个步骤:从喜马拉雅解析专辑或单曲清单,刷新并管理得到API认证令牌,通过上传本地音频文件到得到平台创建笔记,获取原始转录JSON,最后将转录内容导出为结构化的Markdown文件。技能内置了完整的质量检查流程,包括对清单、笔记ID和导出文件数量的对比验证,并提供了针对常见失败场景的解决方案,如喜马拉雅DNS问题或得到API超时。适用于Codex等AI代理平台,用户只需提供喜马拉雅链接,即可获得干净的Markdown转录文件。

兼容平台~Claude Code✓Codex CLI~Cursor
npx skills add 13916236077/ximalaya-dedao-transcripts

Installed? Explore more 研究与数据分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

喜马拉雅·得到脑图转录 是做什么的?

概览

使用此技能将喜马拉雅公开音频链接转换为得到脑记笔记的转录文本。所有脆弱的步骤请优先使用附带的脚本:喜马拉雅清单提取、得到令牌刷新、本地音频上传/笔记创建、原始转录检索以及Markdown导出。

请勿在聊天中粘贴长篇幅的转录文本。将用户端的转录交付文件保存在当前工作空间的 outputs/ 目录下。

工作流程

  1. 创建工作目录:
mkdir -p work/ximalaya_dedao outputs/ximalaya_dedao
  1. 准备得到认证文件。如果用户在工作空间中已有令牌文件,则直接读取。切勿在聊天或日志中打印令牌。
node <skill>/scripts/dedao_refresh_token.mjs \
  --refresh-token-file work/dedao_current_refresh_token.txt \
  --token-file work/dedao_current_token.txt \
  --out-refresh-token-file work/dedao_current_refresh_token.txt \
  --response-file work/ximalaya_dedao/dedao_refresh_response.json
  1. 构建喜马拉雅清单:
node <skill>/scripts/ximalaya_manifest.mjs \
  --url "https://xima.tv/..." \
  --out work/ximalaya_dedao/manifest.json

如果清单报告 complete: false,请在创建得到笔记前先阅读 references/ximalaya-manifest.md 并修复缺失的页面。不要静默处理不完整的专辑。

  1. 创建得到本地音频笔记:
node <skill>/scripts/ximalaya_to_dedao_batch.mjs create \
  --manifest work/ximalaya_dedao/manifest.json \
  --token-file work/dedao_current_token.txt \
  --refresh-token-file work/dedao_current_refresh_token.txt \
  --out-refresh-token-file work/dedao_current_refresh_token.txt \
  --out-dir outputs/ximalaya_dedao
  1. 为每条笔记拉取 original 转录 JSON:
node <skill>/scripts/ximalaya_to_dedao_batch.mjs originals \
  --manifest work/ximalaya_dedao/manifest.json \
  --token-file work/dedao_current_token.txt \
  --refresh-token-file work/dedao_current_refresh_token.txt \
  --out-refresh-token-file work/dedao_current_refresh_token.txt \
  --out-dir outputs/ximalaya_dedao
  1. 导出 Markdown 交付文件:
node <skill>/scripts/export_transcripts.mjs \
  --manifest work/ximalaya_dedao/manifest.json \
  --notes outputs/ximalaya_dedao/note_ids.json \
  --originals outputs/ximalaya_dedao/originals \
  --out-dir outputs/ximalaya_dedao_transcripts
  1. 在最终回复前进行验证:
node -e "const fs=require('fs'); const idx=JSON.parse(fs.readFileSync('outputs/ximalaya_dedao_transcripts/index.json','utf8')); console.log(idx.episode_count, idx.total_text_char_count, idx.missing_files||0)"
find outputs/ximalaya_dedao_transcripts/episodes -maxdepth 1 -name 'p*.md' | wc -l

质量检查

  • 对比清单集数、笔记ID数量、原始JSON数量以及导出的Markdown文件数量。
  • 在导出前检查 originals/pNN.json 文件是否为空或过小。
  • 如果喜马拉雅DNS或得到API调用在沙盒内失败,请使用网络升级权限重新运行相同的重要命令。
  • 对于喜马拉雅的 .m4a 音频,得到可能拒绝 type=m4a;在上传已下载的字节时请传递 --upload-type mp3。这与已验证的本地音频流程一致。
  • 如果 stream_on_local_audio 在写入笔记ID后超时,请保留该笔记ID并直接通过笔记ID获取 original。

参考文档

  • 当得到的上传、签名、令牌刷新、笔记创建或原始检索失败时,请阅读 references/dedao-local-audio.md。
  • 当喜马拉雅专辑/单曲链接无法生成完整清单时,请阅读 references/ximalaya-manifest.md。

相关技能