transcript-fixer
Original:🇺🇸 English
Translated
51 scriptsChecked / no sensitive code detected
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.
7installs
Added on
NPX Install
npx skill4agent add daymade/claude-code-skills transcript-fixerTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Transcript Fixer
Correct speech-to-text transcription errors through dictionary-based rules, AI-powered corrections, and automatic pattern detection. Build a personalized knowledge base that learns from each correction.
When to Use This Skill
- 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
Prerequisites
Python execution must use - never use system Python directly.
uvIf is not installed:
uvbash
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Quick Start
Recommended: Use Enhanced Wrapper (auto-detects API key, opens HTML diff):
bash
# First time: Initialize database
uv run scripts/fix_transcription.py --init
# Process transcript with enhanced UX
uv run scripts/fix_transcript_enhanced.py input.md --output ./correctedThe 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. 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
# 3. Run full correction pipeline
uv run scripts/fix_transcription.py --input meeting.md --stage 3
# 4. Review learned patterns after 3-5 runs
uv run scripts/fix_transcription.py --review-learnedOutput files:
- - Dictionary corrections applied
*_stage1.md - - AI corrections applied (final version)
*_stage2.md - - Visual diff (open in browser for best experience)
*_对比.html
Generate word-level diff (recommended for reviewing corrections):
bash
uv run scripts/generate_word_diff.py original.md corrected.md output.htmlThis creates an HTML file showing word-by-word differences with clear highlighting:
- 🔴 → 🟢
japanese 3 pro(complete word replacements)Gemini 3 Pro - Easy to spot exactly what changed without character-level noise
Example Session
Input transcript ():
meeting.md今天我们讨论了巨升智能的最新进展。
股价系统需要优化,目前性能不够好。After Stage 1 ():
meeting_stage1.md今天我们讨论了具身智能的最新进展。 ← "巨升"→"具身" corrected
股价系统需要优化,目前性能不够好。 ← Unchanged (not in dictionary)After Stage 2 ():
meeting_stage2.md今天我们讨论了具身智能的最新进展。
框架系统需要优化,目前性能不够好。 ← "股价"→"框架" corrected by AILearned pattern detected:
✓ Detected: "股价" → "框架" (confidence: 85%, count: 1)
Run --review-learned after 2 more occurrences to approveCore Workflow
Three-stage pipeline stores corrections in :
~/.transcript-fixer/corrections.db- Initialize (first time):
uv run scripts/fix_transcription.py --init - Add domain corrections:
--add "错误词" "正确词" --domain <domain> - Process transcript:
--input file.md --stage 3 - Review learned patterns: and
--review-learnedhigh-confidence suggestions--approve
Stages: Dictionary (instant, free) → AI via GLM API (parallel) → Full pipeline
Domains: , , , , or custom names including Chinese (e.g., , )
Learning: Patterns appearing ≥3 times at ≥80% confidence move from AI to dictionary
generalembodied_aifinancemedical火星加速器具身智能See for detailed workflows, for complete CLI reference, and for collaboration patterns.
references/workflow_guide.mdreferences/script_parameters.mdreferences/team_collaboration.mdCritical Workflow: Dictionary Iteration
MUST save corrections after each fix. This is the skill's core value.
After fixing errors manually, immediately save to dictionary:
bash
uv run scripts/fix_transcription.py --add "错误词" "正确词" --domain generalSee for complete iteration guide with checklist.
references/iteration_workflow.mdAI Fallback Strategy
When GLM API is unavailable (503, network issues), the script outputs marker.
[CLAUDE_FALLBACK]Claude Code should then:
- Analyze the text directly for ASR errors
- Fix using Edit tool
- MUST save corrections to dictionary with
--add
Database Operations
MUST read before any database operations.
references/database_schema.mdQuick reference:
bash
# View all corrections
sqlite3 ~/.transcript-fixer/corrections.db "SELECT * FROM active_corrections;"
# Check schema version
sqlite3 ~/.transcript-fixer/corrections.db "SELECT value FROM system_config WHERE key='schema_version';"Stages
| Stage | Description | Speed | Cost |
|---|---|---|---|
| 1 | Dictionary only | Instant | Free |
| 2 | AI only | ~10s | API calls |
| 3 | Full pipeline | ~10s | API calls |
Bundled Resources
Scripts:
- - Initialize shared virtual environment (run once, optional)
ensure_deps.py - - Enhanced wrapper (recommended for interactive use)
fix_transcript_enhanced.py - - Core CLI (for automation)
fix_transcription.py - - Generate word-level diff HTML for reviewing corrections
generate_word_diff.py - - Bulk import example
examples/bulk_import.py
References (load as needed):
- Critical: (read before DB operations),
database_schema.md(dictionary iteration best practices)iteration_workflow.md - Getting started: ,
installation_setup.md,glm_api_setup.mdworkflow_guide.md - Daily use: ,
quick_reference.md,script_parameters.mddictionary_guide.md - Advanced: ,
sql_queries.md,file_formats.md,architecture.mdbest_practices.md - Operations: ,
troubleshooting.mdteam_collaboration.md
Troubleshooting
Verify setup health with . Common issues:
uv run scripts/fix_transcription.py --validate- Missing database → Run
--init - Missing API key → (obtain from https://open.bigmodel.cn/)
export GLM_API_KEY="<key>" - Permission errors → Check ownership
~/.transcript-fixer/
See for detailed error resolution and for API configuration.
references/troubleshooting.mdreferences/glm_api_setup.md