Learn english

From Leoyishou/personal-ai-company · View interactive version

Learn english is an AI agent skill from the GitHub repository Leoyishou/personal-ai-company. YouTube 英语学习增强 - 提取音频,基于个人词汇水平添加生词慢速播放和中文讲解

How to use this skill

Skill file

learn-english

YouTube 视频个性化英语学习增强工具 - 基于用户词汇水平自动识别生词句子,添加慢速播放和中文讲解。

核心功能

根据用户在 Supabase 中的词汇数据,对 YouTube 视频进行智能增强:

  1. 识别包含生词的句子
  2. 该句子慢速播放 (0.7x) 让用户听清
  3. 插入中文 TTS 讲解(通俗易懂,让用户瞬间理解整句含义)
  4. 原速重播句子加强记忆

SOP(标准操作流程)

重要:无论原视频/音频多长,默认只处理前 15 分钟(900 秒)

1. 准备音频和 ASR

如果没有 ASR 结果,先用 api-asr skill 处理:

# 调用 api-asr skill 获取语音识别结果

2. 增强处理

python ~/.claude/skills/learn-english/scripts/enhance_video.py \
    --audio /path/to/source.mp3 \
    --asr /path/to/asr.json \
    --output-dir ~/Library/Mobile\ Documents/com~apple~CloudDocs/practiceEngListen/yyMMdd_描述 \
    --duration 900

重要参数说明:

3. 输出规范

必须使用 iCloud practiceEngListen 目录结构:

~/Library/Mobile Documents/com~apple~CloudDocs/practiceEngListen/
├── 260202_gooning/
│   ├── enhanced.mp3      # 增强版音频(用于收听)
│   └── notes.txt         # 学习笔记(可用备忘录打开)
├── 260203_mkbhd_review/
│   ├── enhanced.mp3
│   └── notes.txt
└── ...

目录命名规范: yyMMdd_描述(如 260202_gooning)

notes.txt 格式:

# 260202_gooning 英语学习笔记

原始视频:https://youtube.com/xxx
处理时长:15 分钟

---

## 增强点 1 [00:10 - 00:21]

原文:This is an example sentence with some new words.
整句意思:这是一个包含一些生词的例句。

生词讲解:
- example: 例子,样本
- sentence: 句子

---

## 增强点 2 [00:25 - 00:33]
...

用户英语水平

讲解原则:

词汇数据来源

从 Supabase AI50 项目查询:

增强规则

增强段落结构

[原始音频] → [慢速 0.7x] → [TTS 讲解] → [原速重播] → [继续原音频]

依赖

文件结构

learn-english/
├── SKILL.md
├── scripts/
│   ├── enhance_video.py    # 主入口
│   ├── asr_processor.py    # ASR 句子提取
│   ├── vocab_matcher.py    # Supabase 词汇匹配
│   ├── audio_mixer.py      # FFmpeg 音频处理
│   └── sync_vocab.py       # 词汇同步脚本
├── cache/
│   ├── vocab_cache.json    # 本地词汇缓存
│   └── sync_meta.json      # 同步元数据
└── data/
    └── definitions.json    # 预置词汇释义
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.