全部技能 / 内容创作 / transcript-fixer
内容创作 · daymade/claude-code-skills

transcript-fixer

Corrects speech-to-text transcription errors with dictionary rules and Claude's built-in AI (no external API key required); Native AI Correction is the default, Stage 1 alone is incomplete, and Stage 3 API is only for automation without Claude Code. Builds personalized correction databases, loads person-name ASR variants from the configured global people roster, and reads per-domain contexts for homophones. Before correcting a person name, the agent must consult both the global roster and the owning project's identity roster; project rosters are not auto-loaded, and occurrence frequency is never identity evidence. Use for ASR/STT output with recognition errors, homophones, garbled technical terms, person-name errors, or mixed Chinese/English, and for cleaning transcripts when the user only says "fix this transcript," "clean up these meeting notes," or mentions a garbled name.

风险提醒:橙色 · 评估后使用AI 侦查报告
作者 daymadeGitHub daymade/claude-code-skills ↗Stars 1385许可 MIT(仓库根 LICENSE 文件;GitHub API spdx MIT;Copyright (c) 2025 daymade)commit d5c4678cb5
agent 宿主通常会约束 skill 执行权限;风险提醒为 AI 侦查观点,不构成质量或安全保证。第三方 skill 仅作拆解与展示,安装使用风险自负,版权归原作者。

1实现原理 · 为什么它能做到

两段式修正循环:Stage 1 用确定性词典规则批量应用已知修正,Native AI Correction(Claude/Codex 内建,无需外部 key)通读全文修一次性错误并沉淀可复用修正;Stage 3 API 只服务无 agent 的自动化。

daymade-audio/transcript-fixer/SKILL.md
1. Stage 1 applies deterministic, already-known corrections. 2. Native AI Correction reads the complete transcript, fixes one-off errors, verifies uncertain entities, and compounds reusable fixes.
注:这里在做什么:把『修转录』拆成 确定性强规则(可重复、可审计)与 LLM 语义判断(一次性错误、实体核验)两层,并强制『Native AI Correction is the default. Stage 1 alone is incomplete.』——防只跑字典就说干净。

个人化修正数据库:SQLite(~/.transcript-fixer/corrections.db)存词典/上下文规则/人名名册/审核队列,目录 chmod 0o700、config 0o600,域上下文文件按 ~/.transcript-fixer/contexts/<domain>.md 约定。

daymade-audio/transcript-fixer/scripts/core/defaults.py
# Filesystem security CONFIG_DIR_MODE: Final[int] = 0o700 CONFIG_FILE_MODE: Final[int] = 0o600
注:config.py 默认路径 Path.home()/'.transcript-fixer'/corrections.db、contexts/、data/、logs/、cache/,目录创建即 chmod 0o700;schema 版本 v2.0(schema.sql)+ 迁移 CLI(--migration)。数据库是『越用越准』的载体:confirm 的修正按域沉淀。

人名修正门禁:改人名前必须同时读全局 people roster 与项目显式身份名册;roster 只存 ASR 变体、不自动加载项目册、频率永远不是身份证据。

daymade-audio/transcript-fixer/SKILL.md
Before correcting any person name, directly read both the configured global people roster and the owning project's explicit identity roster or alias ledger. … Never use occurrence frequency as identity evidence.
注:代码面:Stage 1 只自动加载全局 roster 的 'ASR 变体' 条目(commands.py/1330 附近 roster_path = os.getenv('TRANSCRIPT_FIXER_PEOPLE_ROSTER') or config…people_roster_path);裸姓氏+老师/总的组合在加载与 --add/--import(含 --force)都被拒。

Safe mode + 多层匹配防护:默认只自动应用低风险规则,中/高风险 defer 到 *_needs_review.md 与持久化 review queue;匹配期三层检查(超集/常见词边界/词边界)再拒一轮。

daymade-audio/transcript-fixer/SKILL.md
Safe mode is the Stage 1 default: low-risk rules apply; medium/high-risk matches defer to `*_needs_review.md` and the persistent review queue. `Applied: 0` is a valid result, not proof that the transcript is clean.
注:SKILL.md 举词边界例:ASCII 边贴字母算长词内片段(Cloud in iCloud 不纠,数字不算故 cloud3 仍纠);CJK 用词典切分,全部为多字词且跨边界才算拒绝。

审核队列 + 本地 dashboard:队列行 {file, line, original, suggested, kind, context, evidence};review-dashboard/server.py 起 FastAPI 于 127.0.0.1:8767,只读连同一 SQLite,CLI 与人共用同一裁决源。

daymade-audio/transcript-fixer/scripts/review-dashboard/server.py
anchor guards, and audit logging stay the single source of truth — this UI never mutates the database itself. Agent (CLI) and human (this page) are equal writers of the same queue.
注:队列最小条目 JSON(file 必填/context 逐字/line 是锚/suggested 是键)写死在 SKILL.md;--resolve-review/--decision accepted/--reanchor-review/--list-review 是 CLI 侧裁决命令;server 绑定 127.0.0.1(host='127.0.0.1'),非局域网暴露。

AI 增强路由(agent-less):仅当无 Claude/Codex 可用时走 GLM——anthropic 兼容端点 open.bigmodel.cn/api/anthropic,x-api-key 认证,/v1/messages,模型 GLM-5.2(fallback GLM-5-turbo)。

daymade-audio/transcript-fixer/scripts/core/defaults.py
API_PROVIDER: Final[str] = "GLM" DEFAULT_MODEL: Final[str] = "GLM-5.2" FALLBACK_MODEL: Final[str] = "GLM-5-turbo" API_BASE_URL: Final[str] = "https://open.bigmodel.cn/api/anthropic" AUTH_HEADER_NAME: Final[str] = "x-api-key"
注:ai_processor.py _process_chunk 组 url = f'{base_url}/v1/messages'、headers 带 anthropic-version 与 x-api-key,httpx 同步 POST;max_tokens 8000、temperature 0.3、chunk 6000 字符。SKILL.md 规定在 Claude Code/Codex 内不跑 Stage 3。

证据链与关闭契约:修正要有 from_text/to_text 溯源、asr_note 行掩码保护、--close-sidecars 只有在所有队列行裁决/规则停用/文件零 pending 时才报告 closed(exit 1 open/exit 2 blocked)。

daymade-audio/transcript-fixer/SKILL.md
`--close-sidecars --input "<absolute-canonical-file>"` reports `closed`: every entry reads applied in the file (or the original form no longer appears anywhere in the ledger-masked transcript) or is answered by a decided queue row for this exact file
注:『存在 sidecar ≠ 成功』、『pending 行是阻塞态』、final 前必须 stats.pending_total == 0——把『高质/终稿』声明变成可计算状态而非口头保证。

2核心能力

01Stage 1 确定性词典修正(--domain 多域并集/--apply-domain/--dry-run/--json,含 trap 扫描)
02Native AI 全量修正(默认路径;Claude/Codex 内建模型,不需要外部 API key)
03人名修正门禁:全局 roster + 项目身份册双读、变体匹配、禁频率证据、禁裸姓名规则
04域上下文陷阱与 veto:禁裸词/禁入词典降级、confirmed-correct(勿修)记录、--apply-all 为显式操作员覆盖
05不确定项入队 + 本地审核 dashboard(--enqueue-review/--list-review/--resolve-review;server 127.0.0.1:8767)
06学习回路:harvest_corrections 把 native pass 编辑转候选 trap、--report-false-positive 撤销、数字一致性扫描、--scan-traps
07Agent-less Stage 3 API 批处理(GLM key;fix_transcript_enhanced.py,输出 *_stage2.md 需人工 promote)
08音频取证通道:fetch_minute_audio.py 经 lark-cli 取飞书妙记签名 URL + curl 下载并做时间线配对校验
09批处理与分包冷审:native_review_packets(多文件分包、JSON 结果、中断恢复)、git diff 边界核对

3外部依赖

类型依赖
networkopen.bigmodel.cn(GLM/智谱,anthropic 兼容)
cliuv / python3(PEP 723 入口,uv run)
packagehttpx/filelock/aiofiles(ensure_deps 的共享 venv)
packagejieba / rapidfuzz(fix_transcription.py PEP 723 依赖,词边界/模糊匹配)
clilark-cli(飞书 CLI,音频取证;需已登录 profile)
clicurl / ffprobe / sqlite3(工具链)

4风险提醒 风险提醒:橙色 · 评估后使用

风险提醒:橙色 · 评估后使用
  • 词典/域规则本身是高风险数据 — 一条错误/恶意规则会在整域批量误改正文('绿点→绿电' 类真实词);有 veto/探针/false-positive 撤销缓解,但规则入库需要本地信任与人工把关。
  • Stage 3/取证面接触凭证与外发 — GLM key(env/config.json 明文)与文本外发智谱、lark-cli 飞书会话与音频下载——只在自动化或需音频证据时触发,但接触即需用户知情。
  • 复杂度与维护负担高 — 90+ 脚本文件、23 份 references、迁移系统与多版本 schema——新用户学习曲线陡;文档与代码版本错位会直接导致错误使用(skill 自建大量测试应对)。
  • 直接编辑原文件 — Native 模式就地改 transcript 并留 sidecar;若宿主无版本控制或 sidecar 被误删,误改难以回退(有 --close-sidecars/diff 建议缓解)。
  • dashboard 自动开浏览器与后台服务 — server.py 起本地 HTTP 服务并自动 webbrowser.open;宿主需注意长驻进程与端口占用(REVIEW_DASHBOARD_PORT 可改)。
风险提醒:橙色,评估后使用。按统一分档:接触明文凭证——Stage 2/3 读取 GLM_API_KEY/ANTHROPIC_API_KEY 环境变量或 ~/.transcript-fixer/config.json 明文 api key(config 文件 0o600、目录 0o700 缓解);fetch_minute_audio 经 lark-cli 接触用户飞书登录会话;ensure_deps 会从 PyPI 远程安装第三方包。默认 Native/Stage 1 路径其实零网络零密钥(仅本地 SQLite+编辑),但 API/取证/装依赖三面使整体落橙色;网络外发对象为智谱官方端点(可预期)与飞书。

5第二遍独立确认

  • [ok] SQLite 数据库与 0o700/0o600 权限 — defaults.py CONFIG_DIR_MODE=0o700/CONFIG_FILE_MODE=0o600;config.py DatabaseConfig/PathConfig __post_init__ 逐目录 mkdir+chmod;默认路径 Path.home()/'.transcript-fixer'/corrections.db。
  • [ok] 凭证读取面(GLM/ANTHROPIC key 与 config.json) — config.py from_env 读 GLM_API_KEY/ANTHROPIC_API_KEY/ANTHROPIC_BASE_URL;from_file 读 config.json api.api_key;get_config 全局 env 覆盖 file。无其他 key/token 读取。
  • [ok] 网络调用点仅 open.bigmodel.cn(+dashboard 本机) — ai_processor.py _process_chunk url=f'{base_url}/v1/messages' httpx POST;全目录 https?:// 扫描无其他外发端点;astral.sh 仅 ensure_deps 报错文案。
  • [ok] 人名门禁(roster 双读/频率非证据) — commands.py 715-719/1330-1333 roster_path = getenv('TRANSCRIPT_FIXER_PEOPLE_ROSTER') or config…people_roster_path 存在;SKILL.md 操作契约原文存在;Stage1 只加载全局 ASR 变体。
  • [ok] Safe mode 与 defer 行为 — SKILL.md『Safe mode is the Stage 1 default』;commands.py 1401 附近『Stage 1 defaults to conservative safe mode: only auto-apply low-risk』代码注释相符。
  • [ok] review queue 结构(file/line/original/suggested/kind/context/evidence) — SKILL.md 最小条目 JSON 逐字段存在;review_queue.py 以 sqlite 实现(--init 后 db 必须存在)。
  • [ok] dashboard 只读连库且仅本机 — server.py _connect_ro 用 'file:{DB_PATH}?mode=ro';uvicorn.run(host='127.0.0.1', port=PORT);docstring『never mutates the database itself』。
  • [ok] fetch_minute_audio 网络/CLI 行为 — lark-cli minutes +download --url-only → json 取 download_url → curl -sSL --noproxy '*' 下载;LARK_CLI_NO_PROXY=1 防代理带走凭证。

6结论

  • 把『修正』做成闭环数据产品:SQLite 词典/名册/队列/审计 + 学习回路(harvest/learning engine),越用越准且全程可审计。
  • 反幻觉/反过度自信纪律是本 skill 的护城河:visible garble 好过 fluent wrong guess、promote 必须 verbatim quote、pending 阻塞终稿声明。
  • 人名/身份处理极度保守:源侧标注优先、双名册门禁、频率不是身份证据——针对 ASR 人名错的最高风险场景设计。
  • 默认路径零外部依赖(Native AI + 本地 SQLite),只有显式 agent-less 自动化才碰 GLM key——『免费可用』与『可扩展』两全。
  • 质量声明可计算化:--close-sidecars 的 closed 条件、pending_total==0、degraded 标志——不靠嘴说『修好了』。
  • 适合:适合:中文/中英混合 ASR 转录的认真清洗场景(会议纪要、访谈、播客、课程),特别是人名/术语错误高发且要长期沉淀修正库的团队;已有 transcript-fixer 配套队列与人工审核流程的『高保真终稿』需求;以及需批处理+分包冷审的长文档流水线。
    不适合:不适合:只想要一次性轻量清洗、不想初始化 ~/.transcript-fixer 数据库与名册的用户;无 uv/Python 环境的宿主;期望『全自动无需人审』的高风险命名场景(人名门禁坚持要人/证据裁决);把 Stage 3 当默认路径在 Claude Code 里跑的用法(SKILL.md 明令禁止,native 才是默认)。
    安装 agent 直装可复制
    ① 本站镜像 更新 2026-09-09
    方式 A · 人下载镜像包下载 transcript-fixer.tar.gz
    sha256: 1621eed101bbd789…
    方式 B · JSON 格式安装指南,复制给 agent
    安装指南
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② 上游 GitHub · 原始来源
    能访问 GitHub?直接去上游安装(实时版,可能已更新)GitHub 原始 ↗
    本页镜像锁定 commit d5c4678cb5;上游为实时仓库。
    来源信息 GitHub 原始
    作者 / 仓库daymade / daymade/claude-code-skills
    Stars1385
    最近推送2026-09-09
    本 skill commitd5c4678cb5
    许可MIT(仓库根 LICENSE 文件;GitHub API spdx MIT;Copyright (c) 2025 daymade)
    本站信息
    收录日期2026-09-06
    分类内容创作
    侦查报告2026-09-06 · 2 遍
    本站镜像与 GitHub 原始是不同来源:本站锁定 commit 快照经 /r2 分发;GitHub 为实时上游,内容可能已更新。