6.3 KiB
Audita
Audita is a transcript polishing CLI.
audita process validates transcript/glossary input, normalizes and chunks transcript segments, runs the default correction pipeline, and emits corrected transcript output plus machine-readable diagnostics and reports.
What Audita Does
Default module sequence:
glossaryhomophonesglossaryspoken_wordgrammar
Pipeline behavior includes:
- glossary-backed domain/acoustic corrections
- conservative homophone and mistranscription corrections
- conservative spoken-word dysfluency cleanup with semantic guardrails
- grammar/punctuation/capitalization/formatting cleanup
- validator-chain enforcement before application
- run reports and diagnostics artifacts with secret redaction
Build and Install
Build a local binary:
go build -o ./bin/audita ./cmd/audita
Install into your Go bin directory:
go install ./cmd/audita
CLI help:
audita --help
audita process --help
Test
Run all tests:
go test ./...
Basic Usage
Required inputs:
- transcript JSON path (positional argument)
--glossary <glossary.yaml>
Recommended run:
audita process transcript.json \
--glossary glossary.yaml \
--output corrected.json \
--report-json report.json
Explicit module override:
audita process transcript.json \
--glossary glossary.yaml \
--modules glossary,homophones,grammar \
--output corrected.json \
--report-json report.json
Optional transcript background context:
audita process transcript.json \
--glossary glossary.yaml \
--transcript-description "Brief context that may help resolve ambiguous terms." \
--output corrected.json
The transcript description is background context only and does not override transcript content.
Write transcript JSON to stdout (no --output):
audita process transcript.json --glossary glossary.yaml
Control diagnostics location/retention:
audita process transcript.json \
--glossary glossary.yaml \
--work-dir /tmp/audita \
--work-dir-retention auto \
--output corrected.json \
--report-json report.json
Stdout/Stderr Contract
- With
--output, stdout is expected to be empty on success. - Without
--output, stdout contains transcript JSON only on success. --report-jsonwrites a file and is never printed to stdout.- stderr is human-readable diagnostics/errors.
For subprocess orchestration guidance, see docs/subprocess-operations.md.
Configuration
Precedence:
- defaults
- environment (
AUDITA_*) - CLI flags
Modules
AUDITA_MODULES(CSV)- CLI:
--modules
Transcript Description
CLI:
--transcript-description
Behavior:
- optional background context for proposal and LLM-validator prompts;
- trimmed and length-limited by CLI validation;
- does not override transcript content;
- no
AUDITA_*environment variable is currently defined for this setting.
Primary LLM
Environment:
AUDITA_LLM_API_KEY(orOPENROUTER_API_KEYfallback)AUDITA_MODELAUDITA_BASE_URLAUDITA_LLM_TIMEOUT_SECONDSAUDITA_MAX_RETRIES
CLI:
--llm-api-key--model--base-url--llm-timeout-seconds--max-retries
Validation LLM
Environment:
AUDITA_VALIDATION_LLM_API_KEYAUDITA_VALIDATION_MODELAUDITA_VALIDATION_BASE_URLAUDITA_VALIDATION_LLM_TIMEOUT_SECONDSAUDITA_VALIDATION_MAX_RETRIESAUDITA_VALIDATION_LLM_CONCURRENCYAUDITA_VALIDATION_MAX_PROMPT_TOKENS
CLI:
--validation-llm-api-key--validation-model--validation-base-url--validation-llm-timeout-seconds--validation-max-retries--validation-llm-concurrency--validation-max-prompt-tokens
LLM Concurrency
Environment:
AUDITA_TOTAL_LLM_CONCURRENCYAUDITA_PROPOSAL_LLM_CONCURRENCYAUDITA_VALIDATION_LLM_CONCURRENCYAUDITA_LLM_CONCURRENCY(legacy alias forAUDITA_TOTAL_LLM_CONCURRENCY)
CLI:
--total-llm-concurrency--proposal-llm-concurrency--validation-llm-concurrency--llm-concurrency(legacy alias for--total-llm-concurrency)
Behavior:
- all proposal and validation LLM calls are bounded by total LLM concurrency
- proposal LLM calls are additionally bounded by proposal LLM concurrency
- when validation concurrency is unset, it inherits total LLM concurrency
- when explicitly set, proposal and validation concurrency must each be
<= total-llm-concurrency - canonical total settings win when both canonical and legacy alias settings are provided at the same precedence layer
Confidence Thresholds
Environment:
AUDITA_GLOSSARY_CONFIDENCE_THRESHOLDAUDITA_HOMOPHONES_CONFIDENCE_THRESHOLDAUDITA_SPOKEN_WORD_CONFIDENCE_THRESHOLDAUDITA_GRAMMAR_CONFIDENCE_THRESHOLD
CLI:
--glossary-confidence-threshold--homophones-confidence-threshold--spoken-word-confidence-threshold--grammar-confidence-threshold
Normalization and Chunking
Environment:
AUDITA_NORMALIZE_MAX_SEGMENT_GAPAUDITA_NORMALIZE_ELLIPSIS_GAPAUDITA_NORMALIZE_MAX_SEGMENT_DURATIONAUDITA_NORMALIZE_MAX_SEGMENT_TOKENSAUDITA_MAX_SECTION_TOKENSAUDITA_MIN_SECTION_TOKENSAUDITA_TARGET_SECTIONS
CLI:
--normalize-max-segment-gap--normalize-ellipsis-gap--normalize-max-segment-duration--normalize-max-segment-tokens--max-section-tokens--min-section-tokens--target-sections
Work Directory
Environment:
AUDITA_WORK_DIRAUDITA_WORK_DIR_RETENTION(auto,always,never)
CLI:
--work-dir--work-dir-retention
Retention behavior:
always: keep all run directoriesnever: keep successful run directoriesauto: keep failed runs and successful runs with skipped/rejected corrections
Reports and Diagnostics
Per-run diagnostics include:
- source transcript artifacts
- normalized transcript artifact
- normalization summary
- chunking summary
- invocation metadata
- redacted effective config
- module/validator prompt-response diagnostics
report.jsonerror.logon failure
Optional external report output:
--report-json <path>
Documentation
- Architecture:
docs/architecture.md - Structured LLM adapter:
docs/structured-llm.md - Subprocess operations:
docs/subprocess-operations.md