Transcript fixer

From daymade/claude-code-skills · View interactive version

Transcript fixer is an AI agent skill from the GitHub repository daymade/claude-code-skills. Corrects ASR/STT transcription errors — homophones, garbled terms, person-name errors, mixed Chinese/English — with dictionary rules plus Claude's built-in AI, no external API key required. Use to clean meeting notes, lecture transcripts, interviews or speech-recognition text, even when the user onl

How to use this skill

Skill file

Transcript Fixer

Use the correction loop:

  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.

Native AI Correction is the default. Stage 1 alone is incomplete. Stage 3 API exists only for automation that has no Claude/Codex agent available.

Operating contract

Run context

Run every entrypoint through uv run; entrypoints that need third-party Python packages declare them with PEP 723, while stdlib/internal-only utilities may omit the metadata block. Execute commands from the skill directory printed when this skill was invoked, or prefix every script path with that directory. Do not rely on $CLAUDE_SKILL_DIR; it is not available in every harness.

If the bundle location is genuinely unknown, use the installation-resolution procedure in references/installation_setup.md. Do not select the first result from a broad find: caches, backups, and old versions can coexist.

For a clean document library, configure background intermediate storage.

The persisted setting controls ordinary CLI defaults; it does not settle pending items.

To reuse versioned shared dictionaries, people rosters and domain contexts, configure the optional source reader and native publication binding. Unbound standalone behavior stays unchanged; shared names and context do not confirm speaker identities.

Quick start

Resolve <domain-context.md> through the context location

before filling the explicit file argument below.

~~~bash

Initialize once

uv run scripts/fix_transcription.py --init

Stage 1 for one project domain. --apply-domain trusts that explicitly

selected, human-curated domain; occurrence ambiguity and context vetoes defer.

uv run scripts/fix_transcription.py \

--input meeting.md --stage 1 \

--domain myproject --apply-domain --json

Several sibling domains may be loaded as one union.

uv run scripts/fix_transcription.py \

--input meeting.md --stage 1 \

--domain myproject,myproject-alt --apply-domain --json

Preview without writing the Stage 1 output.

uv run scripts/fix_transcription.py \

--input meeting.md --stage 1 --domain myproject --dry-run

Scan all documented context traps after the native read-through.

uv run scripts/fix_transcription.py --scan-traps \

--context-file "<domain-context.md>" \

--input meeting.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.

Stage 1 result contract

An unchanged-input Stage 1 result is:

~~~json

{

"applied": 0,

"deferred": 0,

"output_path": null,

"needs_review_path": null,

"input_unchanged": true,

"review_enqueued": 0,

"stage1_only_incomplete": true,

"stage2_total_chunks": 0,

"stage2_failed_chunks": 0,

"stage2_degraded": false,

"boundary_refused": 0,

"boundary_check_active": true

}

~~~

Read every field in the result. boundary_refused counts dictionary matches the word-boundary check refused this run — neither applied nor deferred, so a caller comparing runs can see why a deferral disappeared; --apply-all switches that check off. When boundary_check_active=false, a zero refusal count does not establish that the check ran. stage1_only_incomplete is additive to the original caller contract and must remain true for a Stage 1 script run; only the caller can close it by running Native AI, or by explicitly choosing the agent-less Stage 2/3 route. The stage2_* telemetry fields are always present: Stage 1 reports 0, 0, and false; Stage 2/3 replace them with the actual API outcome. Do not infer no-op or success from whether a sidecar exists.

When a rerun auto-finalizes an earlier Stage 1 sidecar, applied=0 counts new corrections in this invocation while input_unchanged=false records the promotion. The result also carries stage1_publication: {"schema_version":1,"state":"already_promoted","canonical_path":"<absolute-input>","sha256":"<current-canonical-sha256>"}. Validate this complete object, require output_path to resolve to the same regular canonical file, and compare its current bytes with the supplied SHA-256 before continuing. Do not promote the canonical again or accept this state on a dry run, alongside new corrections/deferrals, or without a matching digest. Missing publication evidence does not relax the ordinary no-op/sidecar contract; stale bytes require a fresh result rather than an overwrite.

For a native end-to-end example, read references/example_session_dji_minutes.md.

Choose the route

| Route | Use when | Required reading |

|---|---|---|

| Pending continuation | Dated Native/review evidence covers this exact file; only uncertain rows remain, or the user supplies a verdict | pending-continuation.md; reuse unchanged completed coverage |

| Fast native | Short/plain transcript, known speakers, low stakes | This file + native_ai_full_workflow.md |

| Full native | Domain-heavy, unfamiliar entities, 3+ speakers, long or decision-bearing transcript | native_ai_full_workflow.md, plus queue and evidence references below |

| Scoped speaker inference | User explicitly authorizes identity inference for this transcript/task | scoped_speaker_inference.md; keep ordinary ASR correction on the native route |

| Caller integration | Another skill or ingest pipeline invokes Stage 1 | Cross-skill caller contract below |

| Review queue/dashboard | Any item is uncertain or needs audio | review_queue_dashboard.md |

| Agent-less API | CI/batch automation with no agent available | glm_api_setup.md and workflow_guide.md |

| Multi-file batch | Several related transcripts; especially 10+ files | advanced_correction_evidence.md |

Use vocabulary and stakes as the primary tier signals; use length only as a tiebreaker. A five-minute medical interview can require the full tier, while a long plain two-person memo can use the fast tier.

Native correction checklist

Read the required native sequence in full

before correcting. It routes provenance, entity triage, edits, cold-review recovery,

queue decisions and finalization to their action-time references.

  1. Give the input a final human-readable path; recover/diff raw provenance.
  2. Load project context, read the whole transcript, run Stage 1 and inspect its diff.
  3. Triage candidates; apply only minimal occurrence-supported corrections.
  4. Run the trap scan; complete Full-tier cold review and adjudicate its residuals.
  5. Resolve exact-file queue rows; read human state before repeating work.
  6. Verify the edited file, require zero pending for final/high-quality claims,

close sidecars mechanically, harvest stable patterns and review entity propagation.

Read native action details

before the corresponding queue, learning or same-file entity-sweep action. In

particular, person-name authority belongs in --authority/--authority-record,

not --note; a sentence-local correction is not automatically a reusable rule.

Cross-skill caller contract

A caller pipeline must:

  1. Run Stage 1 with the explicitly configured project domain(s), --apply-domain, and --json. If deferred > review_enqueued, persist the review sidecar outside any temporary directory or surface the gap as failure.
  2. Run Native AI with this skill loaded, or report Stage 1 only — incomplete. Agent-less automation may use Stage 3 instead.
  3. Select artifact locations from the destination's storage contract and configured defaults. --output overrides run outputs and the default report location; --sidecar-dir overrides reports independently. A caller with a private temporary workspace must bind --output explicitly and retain its evidence before that workspace expires. Closure discovers configured and registered report directories. Keep unresolved evidence outside a clean library without changing its verdict.

Canonical call:

~~~bash

uv run scripts/fix_transcription.py \

--input "$staged" --stage 1 \

--domain "$domains" --apply-domain --json

~~~

A caller that wires only the script path never loads this contract. Script-path integration alone is therefore a Stage 1 prefilter, not transcript correction.

Keep project domains warm: every confirmed recurring correction from the native pass must be added back to the correct project domain, roster, or context file.

Conditional actions

Read the matching section before acting; these are existing supported jobs:

| Action | Required detail |

|---|---|

| Add a dictionary/context rule, roster variant, or recurring trap | Dictionary and identity safety, identity/context owner, false-positive guide |

| Enqueue, accept/override/keep/skip, attach authority, re-anchor, consolidate, or record a ledger verdict | Review queue safety, queue/dashboard; use pending continuation for already-reviewed files |

| Numbers, written artifacts, parallel recordings, clip cross-checks or batches | Numbers, artifacts, and batches, advanced evidence |

| Promote outputs, close sidecars, archive or verify final quality | Finalization, queue/finalization detail |

| Agent-less API automation, including degraded output handling | Agent-less API route, API setup, workflow guide |

| Extract uncertainty, import presets, repair timestamps, split/rebase, diff, harvest, look up or validate setup, inspect or change context-rule state | Utility commands, CLI parameters |

| Compare duplicate/overlapping transcripts or parse/count speaker turns | Transcript comparison/parsing |

Detection and enqueueing are not correction. A final/high-quality claim requires

exact-file stats.pending_total == 0; zero pending rows is required after the

file edits are read back. An unresolved file stays draft / unresolved — incomplete.

A sampled clip settles only that anchored item. For high-stakes multi-recording

requests for a complete/better transcript with baseline audio available, load

/daymade-audio:asr-transcribe-to-text and cover the complete clearest recording;

the same recognizer proves complete-source coverage, not independent corroboration.

User verdicts settle occurrences, but they do not make a replacement reusable:

a rare sentence-local mishearing stays file-only.

Reference map

| Need | Read |

|---|---|

| Historical incidents (optional; not a prerequisite) | native_historical_evidence.md |

| Native action details and command examples | native_action_details.md |

| Raw/upstream adjudication | native_upstream_provenance.md |

| Name/token triage and local ladder | native_entity_triage.md |

| Minimal edits / metadata provenance | native_correction_application.md, native_metadata_provenance.md |

| Full cold review / queue and archive details | native_second_pass.md, native_queue_finalization.md |

| Duplicate transcript comparison and turn parsing | native_transcript_comparison.md |

| Full native correction sequence | native_ai_full_workflow.md |

| Explicit one-task speaker inference in a separate reader copy | scoped_speaker_inference.md |

| Split/batch cold-review packets, result validation, and interruption recovery | native_review_packets.md |

| Dictionary, people roster, domain contexts | dictionary_identity_and_context.md |

| False-positive policy | false_positive_guide.md |

| Queue, dashboard, audio, re-anchor | review_queue_dashboard.md |

| Verified local/authorized SSH source clips (fetch), single frames (frame), and exploratory turn-window locator (locate) | Source clips; retain the existing local/URL --audio route |

| Append project-bound queue rows or repair omitted domain metadata | Queue domain repair; preview first, preserve verdicts |

| Resume pending evidence or apply an explicit human verdict | pending-continuation.md |

| Numbers, photos, multi-recording, clip cross-check, batches, batch pending-queue audio adjudication | advanced_correction_evidence.md |

| Context-file location and grammar/template | domain_context_guide.md |

| CLI flags and review-item schema | script_parameters.md |

| Database schema and queries | database_schema.md, sql_queries.md |

| Short command lookup | quick_reference.md, dictionary_guide.md |

| Learning loop | iteration_workflow.md |

| Native examples | example_session_dji_minutes.md |

| Agent-less API example/config | example_session.md, glm_api_setup.md, installation_setup.md |

| Architecture and formats | architecture.md, file_formats.md |

| Operational guidance | best_practices.md, troubleshooting.md, team_collaboration.md, workflow_guide.md |

Bundled scripts are executed, not loaded into context. The primary entry points are fix_transcription.py, scan_numeric_consistency.py, fetch_minute_audio.py, review-dashboard/server.py, and the diff/timestamp/splitting utilities listed above.

Handoff

After correction, hand off to /daymade-audio:meeting-minutes-taker only when the user wants a structured summary. Do not create meeting minutes automatically: transcript correction and summarization are separate scopes.

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.