← Back to Skills Marketplace
nanfeiduliri

英语笔记出题机

by nanfeiduliri · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
70
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install english-coach-publish
Description
基于美剧笔记的英语学习技能,覆盖听说读写复习五个模块。触发词:练英语、英语练习、默写、听力、口语、阅读。TTS 使用百度语音API,ASR 使用本地 faster-whisper。首次使用需配置百度 TTS 凭证和 Whisper 模型。
README (SKILL.md)

帮你练英语

概述

基于用户的美剧笔记文件,生成听说读写四个模块的线性训练任务流。触发技能后自动创建 5 个任务,完成一个自动推进下一个。

首次使用配置(约 10 分钟)

1. 准备美剧笔记

references/notes.md 中按以下格式记录笔记:

### Entry 1
- **例句:** risking our liquor license, our livelihood?
- **词汇:** livelihood /ˈlaɪvlihʊd/ n. 生计

模板文件:references/notes.md

2. 配置百度 TTS(可选)

听力模块需要百度语音 TTS 生成音频。免费注册获取 API Key:

  1. 访问 https://console.bce.baidu.com/ai/#/ai/speech/app/list 注册百度智能云
  2. 创建应用 → 领取免费额度(新用户有免费额度)
  3. 将 API Key 和 Secret Key 填入 references/baidu_credentials.md
  4. 如不配置,听力模块会自动降级为"自念模式"

3. 搭建 Whisper(口语模块,约 5 分钟)

口语模块使用本地 faster-whisper 进行语音识别。一次性搭建:

# 安装依赖
~/.workbuddy/binaries/python/versions/*/python.exe -m venv ~/.workbuddy/binaries/python/envs/default
~/.workbuddy/binaries/python/envs/default/Scripts/pip.exe install faster-whisper huggingface_hub

# 下载模型(base,约 150MB,国内用 hf-mirror.com 镜像)
~/.workbuddy/binaries/python/envs/default/Scripts/python.exe -c "
from huggingface_hub import snapshot_download
snapshot_download('guillaumeklay/faster-whisper-base',
    local_dir='~/.workbuddy/binaries/python/whisper_models/base'.replace('~', 'C:/Users/你的用户名'),
    endpoint='https://hf-mirror.com')
"

如果 Whisper 不可用,口语模块会自动降级为"文字输入模式"。


核心规则

出题规则:不露词

绝对不要在题目中展示目标单词的完整拼写。只能使用:

  • 首字母 + 字母数:l_______d(9字母)
  • 首字母提示:(l开头)

批改格式:三段式

题目:[中文翻译]
你写:[用户答案]
正确:[原句]

临时文件

所有临时文件放在 .workbuddy/tmp_audio/,训练完成后自动清理。


模块一:写 — 句子默写

  1. 从笔记读取所有条目,出中文翻译题(不露词)
  2. 用户一次性写出所有句子
  3. 逐句三段式批改

模块二:听 — 听力练习

  1. 用百度 TTS 生成 5 句语音(BAIDU 不可用时降级为自念模式)
  2. 生成播放页面 listen.html
  3. 用户听后写下内容
  4. 三段式对比批改

模块三:说 — 口语练习

ASR 引擎: 本地 faster-whisper(base 模型),通过 Python HTTP 服务器(端口 8765)提供语音识别。

训练流程

  1. 从笔记选 3 个含多个目标词的句子
  2. 读取 references/speak_template.html,注入句子 → .workbuddy/tmp_audio/speak.html
  3. 写入 server.py.workbuddy/tmp_audio/
  4. 启动服务器,告知用户在 Chrome 打开 http://localhost:8765/speak.html
  5. 用户录音 → Whisper 识别 → 提交 → 三段式批改

server.py 模板:

from http.server import HTTPServer, SimpleHTTPRequestHandler
import json, base64, tempfile, os, sys

# 根据实际路径修改
WHISPER_MODEL = "~/.workbuddy/binaries/python/whisper_models/base".replace("~", os.path.expanduser("~"))
sys.path.insert(0, os.path.expanduser("~/.workbuddy/binaries/python/envs/default/Lib/site-packages"))

class Handler(SimpleHTTPRequestHandler):
    def do_POST(self):
        if self.path == "/transcribe":
            length = int(self.headers["Content-Length"])
            data = json.loads(self.rfile.read(length))
            audio_bytes = base64.b64decode(data.get("audio", ""))
            tmp = tempfile.NamedTemporaryFile(suffix=".wav", delete=False)
            tmp.write(audio_bytes); tmp.close()
            from faster_whisper import WhisperModel
            model = WhisperModel(WHISPER_MODEL, device="cpu", compute_type="int8")
            segments, _ = model.transcribe(tmp.name, language="en")
            text = " ".join([s.text for s in segments]).strip()
            os.unlink(tmp.name)
            self.send_response(200); self.send_header("Content-Type", "application/json")
            self.end_headers()
            self.wfile.write(json.dumps({"text": text}).encode())
        elif self.path == "/submit-results":
            length = int(self.headers["Content-Length"])
            data = json.loads(self.rfile.read(length))
            with open("speech_results.json", "w") as f:
                json.dump(data, f, indent=2)
            self.send_response(200); self.end_headers()

if __name__ == "__main__":
    os.chdir(os.path.dirname(os.path.abspath(__file__)))
    HTTPServer(("127.0.0.1", 8765), Handler).serve_forever()

模块四:读 — 阅读理解

  1. 从笔记选 1-2 段台词
  2. 出 2-3 道理解题(词义/句意/造句)
  3. 逐题解析 + 用户造句

模块五:复习 — 基于遗忘曲线

遗忘曲线规则(Ebbinghaus)

级别 间隔 说明
L0 当天 首次错误
L1 1天后
L2 3天后
L3 7天后
L4 15天后
L5 30天后 达标,移出

复习池格式(references/review_pool.md):

| 单词 | 正确拼写 | 中文释义 | 级别 | 上次复习 | 下次复习 | 来源例句 |

支持每日自动推送到期词汇(通过 WorkBuddy 自动化功能)。


资源配置

文件 用途 用户需配置
references/notes.md 美剧笔记 ✅ 必须(填入自己的笔记)
references/baidu_credentials.md 百度 TTS API 凭证 🟡 推荐(听力降级也可用)
references/review_pool.md 遗忘曲线复习池 自动生成
references/speak_template.html 口语练习页面模板 无需修改
references/notes_path.md 笔记路径记录 自动维护
Usage Guidance
Install only if you are comfortable keeping Baidu API keys and learning records in local markdown files and using a localhost speech-recognition server for microphone practice. Do not commit the credentials file to a repository, keep the skill directory private, and close the speech server when the speaking exercise is finished.
Capability Tags
requires-oauth-tokenrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The capabilities match the stated purpose: generating English practice from notes, optional TTS for listening, local Whisper-based speaking practice, reading exercises, and spaced review.
Instruction Scope
The trigger phrases are broad and could invoke the skill during ordinary English-study conversation, but the resulting actions are disclosed training workflows rather than hidden or unrelated behavior.
Install Mechanism
Installation is described through the skill marketplace or a Git clone, with optional setup commands for faster-whisper and model download; no hidden installer, obfuscation, or unexpected package dependency was found.
Credentials
The skill asks for proportionate resources for its purpose: user-maintained notes, optional Baidu TTS credentials, a local Python environment, a Whisper model, Chrome, and microphone access for speaking practice.
Persistence & Privilege
It writes temporary audio/practice files, maintains a review pool, stores optional API keys in a markdown reference file, and can run a localhost server for speech recognition; these are disclosed and purpose-aligned, but users should protect those local files.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install english-coach-publish
  3. After installation, invoke the skill by name or use /english-coach-publish
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- No changes detected; this release is identical to the previous version. - Version bump for consistency or administrative purposes only.
v1.0.0
english-coach version 1.0.0 – initial release. - Introduces a comprehensive English learning skill based on TV show notes, covering listening, speaking, reading, writing, and spaced repetition review modules. - Features automatic task flow: starts with 5 tasks per session, advances to the next after completion. - Requires initial setup of custom notes and optional configuration for Baidu TTS and local Whisper ASR. - All practice avoids showing full target words in questions; includes clear correction formats. - Automatically manages and cleans up temporary files; supports daily auto-push of review vocabulary.
Metadata
Slug english-coach-publish
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is 英语笔记出题机?

基于美剧笔记的英语学习技能,覆盖听说读写复习五个模块。触发词:练英语、英语练习、默写、听力、口语、阅读。TTS 使用百度语音API,ASR 使用本地 faster-whisper。首次使用需配置百度 TTS 凭证和 Whisper 模型。 It is an AI Agent Skill for Claude Code / OpenClaw, with 70 downloads so far.

How do I install 英语笔记出题机?

Run "/install english-coach-publish" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 英语笔记出题机 free?

Yes, 英语笔记出题机 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 英语笔记出题机 support?

英语笔记出题机 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 英语笔记出题机?

It is built and maintained by nanfeiduliri (@nanfeiduliri); the current version is v1.0.1.

💬 Comments