Release v1.9.0: Add video-comparer skill and enhance transcript-fixer

## New Skill: video-comparer v1.0.0
- Compare original and compressed videos with interactive HTML reports
- Calculate quality metrics (PSNR, SSIM) for compression analysis
- Generate frame-by-frame visual comparisons (slider, side-by-side, grid)
- Extract video metadata (codec, resolution, bitrate, duration)
- Multi-platform FFmpeg support with security features

## transcript-fixer Enhancements
- Add async AI processor for parallel processing
- Add connection pool management for database operations
- Add concurrency manager and rate limiter
- Add audit log retention and database migrations
- Add health check and metrics monitoring
- Add comprehensive test suite (8 new test files)
- Enhance security with domain and path validators

## Marketplace Updates
- Update marketplace version from 1.8.0 to 1.9.0
- Update skills count from 15 to 16
- Update documentation (README.md, CLAUDE.md, CHANGELOG.md)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
daymade
2025-10-30 00:23:12 +08:00
parent bd0aa12004
commit 9b724f33e3
49 changed files with 15357 additions and 270 deletions

View File

@@ -1,6 +1,6 @@
---
name: transcript-fixer
description: Corrects speech-to-text (ASR/STT) transcription errors in meeting notes, lecture recordings, interviews, and voice memos through dictionary-based rules and AI corrections. This skill should be used when users mention 'transcript', 'ASR errors', 'speech-to-text', 'STT mistakes', 'meeting notes', 'dictation', 'homophone errors', 'voice memo cleanup', or when working with .md/.txt files containing Chinese/English mixed content with obvious transcription errors.
description: Corrects speech-to-text transcription errors in meeting notes, lectures, and interviews using dictionary rules and AI. Learns patterns to build personalized correction databases. Use when working with transcripts containing ASR/STT errors, homophones, or Chinese/English mixed content requiring cleanup.
---
# Transcript Fixer
@@ -9,38 +9,48 @@ Correct speech-to-text transcription errors through dictionary-based rules, AI-p
## When to Use This Skill
Activate this skill when:
- Correcting speech-to-text (ASR) transcription errors in meeting notes, lectures, or interviews
- Building domain-specific correction dictionaries for repeated transcription workflows
- Fixing Chinese/English homophone errors, technical terminology, or names
- Collaborating with teams on shared correction knowledge bases
- Improving transcript accuracy through iterative learning
- Correcting ASR/STT errors in meeting notes, lectures, or interviews
- Building domain-specific correction dictionaries
- Fixing Chinese/English homophone errors or technical terminology
- Collaborating on shared correction knowledge bases
## Quick Start
Initialize (first time only):
**Recommended: Use Enhanced Wrapper** (auto-detects API key, opens HTML diff):
```bash
# First time: Initialize database
uv run scripts/fix_transcription.py --init
export GLM_API_KEY="<api-key>" # Obtain from https://open.bigmodel.cn/
# Process transcript with enhanced UX
uv run scripts/fix_transcript_enhanced.py input.md --output ./corrected
```
Correct a transcript in 3 steps:
The enhanced wrapper automatically:
- Detects GLM API key from shell configs (checks lines near `ANTHROPIC_BASE_URL`)
- Moves output files to specified directory
- Opens HTML visual diff in browser for immediate feedback
**Alternative: Use Core Script Directly**:
```bash
# 1. Add common corrections (5-10 terms)
# 1. Set API key (if not auto-detected)
export GLM_API_KEY="<api-key>" # From https://open.bigmodel.cn/
# 2. Add common corrections (5-10 terms)
uv run scripts/fix_transcription.py --add "错误词" "正确词" --domain general
# 2. Run full correction pipeline
# 3. Run full correction pipeline
uv run scripts/fix_transcription.py --input meeting.md --stage 3
# 3. Review learned patterns after 3-5 runs
# 4. Review learned patterns after 3-5 runs
uv run scripts/fix_transcription.py --review-learned
```
**Output files**:
- `meeting_stage1.md` - Dictionary corrections applied
- `meeting_stage2.md` - AI corrections applied (final version)
- `*_stage1.md` - Dictionary corrections applied
- `*_stage2.md` - AI corrections applied (final version)
- `*_对比.html` - Visual diff (open in browser for best experience)
## Example Session
@@ -68,113 +78,39 @@ uv run scripts/fix_transcription.py --review-learned
Run --review-learned after 2 more occurrences to approve
```
## Workflow Checklist
## Core Workflow
Copy and customize this checklist for each transcript:
Three-stage pipeline stores corrections in `~/.transcript-fixer/corrections.db`:
```markdown
### Transcript Correction - [FILENAME] - [DATE]
- [ ] Validation passed: `uv run scripts/fix_transcription.py --validate`
- [ ] GLM_API_KEY verified: `echo $GLM_API_KEY | wc -c` (should be >20)
- [ ] Domain selected: [general/embodied_ai/finance/medical]
- [ ] Added 5-10 domain-specific corrections to dictionary
- [ ] Tested Stage 1 (dictionary only): Output reviewed at [FILENAME]_stage1.md
- [ ] Stage 2 (AI) completed: Final output verified at [FILENAME]_stage2.md
- [ ] Learned patterns reviewed: `--review-learned`
- [ ] High-confidence suggestions approved (if any)
- [ ] Team dictionary updated (if applicable): `--export team.json`
```
1. **Initialize** (first time): `uv run scripts/fix_transcription.py --init`
2. **Add domain corrections**: `--add "错误词" "正确词" --domain <domain>`
3. **Process transcript**: `--input file.md --stage 3`
4. **Review learned patterns**: `--review-learned` and `--approve` high-confidence suggestions
## Core Commands
**Stages**: Dictionary (instant, free) → AI via GLM API (parallel) → Full pipeline
**Domains**: `general`, `embodied_ai`, `finance`, `medical` (isolates corrections)
**Learning**: Patterns appearing ≥3 times at ≥80% confidence move from AI to dictionary
```bash
# Initialize (first time only)
uv run scripts/fix_transcription.py --init
export GLM_API_KEY="<api-key>" # Get from https://open.bigmodel.cn/
# Add corrections
uv run scripts/fix_transcription.py --add "错误词" "正确词" --domain general
# Run full pipeline (dictionary + AI corrections)
uv run scripts/fix_transcription.py --input file.md --stage 3 --domain general
# Review and approve learned patterns (after 3-5 runs)
uv run scripts/fix_transcription.py --review-learned
uv run scripts/fix_transcription.py --approve "错误" "正确"
# Team collaboration
uv run scripts/fix_transcription.py --export team.json --domain <domain>
uv run scripts/fix_transcription.py --import team.json --merge
# Validate setup
uv run scripts/fix_transcription.py --validate
```
**Database**: `~/.transcript-fixer/corrections.db` (SQLite)
**Stages**:
- Stage 1: Dictionary corrections (instant, zero cost)
- Stage 2: AI corrections via GLM API (1-2 min per 1000 lines)
- Stage 3: Full pipeline (both stages)
**Domains**: `general`, `embodied_ai`, `finance`, `medical` (prevents cross-domain conflicts)
**Learning**: Approve patterns appearing ≥3 times with ≥80% confidence to move from expensive AI (Stage 2) to free dictionary (Stage 1).
See `references/workflow_guide.md` for detailed workflows and `references/team_collaboration.md` for collaboration patterns.
See `references/workflow_guide.md` for detailed workflows, `references/script_parameters.md` for complete CLI reference, and `references/team_collaboration.md` for collaboration patterns.
## Bundled Resources
### Scripts
**Scripts:**
- `fix_transcript_enhanced.py` - Enhanced wrapper (recommended for interactive use)
- `fix_transcription.py` - Core CLI (for automation)
- `examples/bulk_import.py` - Bulk import example
- **`fix_transcription.py`** - Main CLI for all operations
- **`examples/bulk_import.py`** - Bulk import example (runnable with `uv run scripts/examples/bulk_import.py`)
**References** (load as needed):
- Getting started: `installation_setup.md`, `glm_api_setup.md`, `workflow_guide.md`
- Daily use: `quick_reference.md`, `script_parameters.md`, `dictionary_guide.md`
- Advanced: `sql_queries.md`, `file_formats.md`, `architecture.md`, `best_practices.md`
- Operations: `troubleshooting.md`, `team_collaboration.md`
### References
## Troubleshooting
Load as needed for detailed guidance:
- **`workflow_guide.md`** - Step-by-step workflows, pre-flight checklist, batch processing
- **`quick_reference.md`** - CLI/SQL/Python API quick reference
- **`sql_queries.md`** - SQL query templates (copy-paste ready)
- **`troubleshooting.md`** - Error resolution, validation
- **`best_practices.md`** - Optimization, cost management
- **`file_formats.md`** - Complete SQLite schema
- **`installation_setup.md`** - Setup and dependencies
- **`team_collaboration.md`** - Git workflows, merging
- **`glm_api_setup.md`** - API key configuration
- **`architecture.md`** - Module structure, extensibility
- **`script_parameters.md`** - Complete CLI reference
- **`dictionary_guide.md`** - Dictionary strategies
## Validation and Troubleshooting
Run validation to check system health:
```bash
uv run scripts/fix_transcription.py --validate
```
**Healthy output:**
```
✅ Configuration directory exists: ~/.transcript-fixer
✅ Database valid: 4 tables found
✅ GLM_API_KEY is set (47 chars)
✅ All checks passed
```
**Error recovery:**
1. Run validation to identify issue
2. Check components:
- Database: `sqlite3 ~/.transcript-fixer/corrections.db ".tables"`
- API key: `echo $GLM_API_KEY | wc -c` (should be >20)
- Permissions: `ls -la ~/.transcript-fixer/`
3. Apply fix based on validation output
4. Re-validate to confirm
**Quick fixes:**
Verify setup health with `uv run scripts/fix_transcription.py --validate`. Common issues:
- Missing database → Run `--init`
- Missing API key → `export GLM_API_KEY="<key>"`
- Permission errors → Check ownership with `ls -la`
- Missing API key → `export GLM_API_KEY="<key>"` (obtain from https://open.bigmodel.cn/)
- Permission errors → Check `~/.transcript-fixer/` ownership
See `references/troubleshooting.md` for detailed error codes and solutions.
See `references/troubleshooting.md` for detailed error resolution and `references/glm_api_setup.md` for API configuration.