2026-05-12 15:19:50 -05:00
# Audita
2026-05-10 23:34:43 +00:00
2026-05-12 13:46:14 +00:00
Audita is a transcript polishing CLI.
2026-05-10 23:34:43 +00:00
2026-05-12 15:19:50 -05:00
`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.
2026-05-10 23:34:43 +00:00
2026-05-12 15:19:50 -05:00
## What Audita Does
2026-05-10 23:34:43 +00:00
2026-05-12 15:19:50 -05:00
Default module sequence:
- `glossary`
- `homophones`
- `glossary`
- `spoken_word`
- `grammar`
2026-05-10 23:34:43 +00:00
2026-05-12 15:19:50 -05:00
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
2026-05-10 23:34:43 +00:00
2026-05-12 13:46:14 +00:00
Build a local binary:
2026-05-11 13:35:15 +00:00
2026-05-12 13:46:14 +00:00
```sh
go build -o ./bin/audita ./cmd/audita
```
Install into your Go bin directory:
```sh
go install ./cmd/audita
```
2026-05-12 15:19:50 -05:00
CLI help:
2026-05-12 13:46:14 +00:00
```sh
audita --help
audita process --help
```
2026-05-10 23:34:43 +00:00
2026-05-12 13:46:14 +00:00
## Test
2026-05-10 23:34:43 +00:00
2026-05-12 15:19:50 -05:00
Run all tests:
2026-05-10 23:34:43 +00:00
```sh
go test ./...
```
2026-05-12 15:19:50 -05:00
## Basic Usage
2026-05-12 13:46:14 +00:00
Required inputs:
- transcript JSON path (positional argument)
- `--glossary <glossary.yaml>`
2026-05-12 15:19:50 -05:00
Recommended run:
2026-05-12 13:46:14 +00:00
```sh
audita process transcript.json \
--glossary glossary.yaml \
--output corrected.json \
--report-json report.json
```
Explicit module override:
2026-05-10 23:34:43 +00:00
```sh
2026-05-12 13:46:14 +00:00
audita process transcript.json \
--glossary glossary.yaml \
--modules glossary,homophones,grammar \
--output corrected.json \
--report-json report.json
2026-05-10 23:34:43 +00:00
```
2026-05-13 12:13:32 +00:00
Optional transcript background context:
```sh
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.
2026-05-12 15:19:50 -05:00
Write transcript JSON to stdout (no `--output` ):
2026-05-10 23:34:43 +00:00
```sh
2026-05-12 13:46:14 +00:00
audita process transcript.json --glossary glossary.yaml
2026-05-10 23:34:43 +00:00
```
2026-05-12 15:19:50 -05:00
Control diagnostics location/retention:
2026-05-10 23:34:43 +00:00
2026-05-12 13:46:14 +00:00
```sh
audita process transcript.json \
--glossary glossary.yaml \
--work-dir /tmp/audita \
--work-dir-retention auto \
--output corrected.json \
--report-json report.json
```
2026-05-10 23:34:43 +00:00
2026-05-12 15:19:50 -05:00
## Stdout/Stderr Contract
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
- With `--output` , stdout is expected to be empty on success.
2026-05-12 13:46:14 +00:00
- Without `--output` , stdout contains transcript JSON only on success.
2026-05-12 15:19:50 -05:00
- `--report-json` writes a file and is never printed to stdout.
- stderr is human-readable diagnostics/errors.
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
For subprocess orchestration guidance, see [`docs/subprocess-operations.md` ](docs/subprocess-operations.md ).
2026-05-12 13:46:14 +00:00
## Configuration
Precedence:
1. defaults
2. environment (`AUDITA_*` )
3. CLI flags
2026-05-12 15:19:50 -05:00
### Modules
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
- `AUDITA_MODULES` (CSV)
- CLI: `--modules`
2026-05-12 13:46:14 +00:00
2026-05-13 12:13:32 +00:00
### 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.
2026-05-12 15:19:50 -05:00
### Primary LLM
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
Environment:
2026-05-12 13:46:14 +00:00
- `AUDITA_LLM_API_KEY` (or `OPENROUTER_API_KEY` fallback)
- `AUDITA_MODEL`
- `AUDITA_BASE_URL`
- `AUDITA_LLM_TIMEOUT_SECONDS`
- `AUDITA_MAX_RETRIES`
2026-05-12 15:19:50 -05:00
CLI:
2026-05-12 13:46:14 +00:00
- `--llm-api-key`
- `--model`
- `--base-url`
- `--llm-timeout-seconds`
- `--max-retries`
2026-05-12 15:19:50 -05:00
### Validation LLM
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
Environment:
2026-05-12 13:46:14 +00:00
- `AUDITA_VALIDATION_LLM_API_KEY`
- `AUDITA_VALIDATION_MODEL`
- `AUDITA_VALIDATION_BASE_URL`
- `AUDITA_VALIDATION_LLM_TIMEOUT_SECONDS`
- `AUDITA_VALIDATION_MAX_RETRIES`
- `AUDITA_VALIDATION_LLM_CONCURRENCY`
- `AUDITA_VALIDATION_MAX_PROMPT_TOKENS`
2026-05-12 15:19:50 -05:00
CLI:
2026-05-12 13:46:14 +00:00
- `--validation-llm-api-key`
- `--validation-model`
- `--validation-base-url`
- `--validation-llm-timeout-seconds`
- `--validation-max-retries`
- `--validation-llm-concurrency`
- `--validation-max-prompt-tokens`
2026-05-12 21:17:35 +00:00
### LLM Concurrency
Environment:
- `AUDITA_TOTAL_LLM_CONCURRENCY`
- `AUDITA_PROPOSAL_LLM_CONCURRENCY`
- `AUDITA_VALIDATION_LLM_CONCURRENCY`
- `AUDITA_LLM_CONCURRENCY` (legacy alias for `AUDITA_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
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
### Confidence Thresholds
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
Environment:
2026-05-12 13:46:14 +00:00
- `AUDITA_GLOSSARY_CONFIDENCE_THRESHOLD`
- `AUDITA_HOMOPHONES_CONFIDENCE_THRESHOLD`
- `AUDITA_SPOKEN_WORD_CONFIDENCE_THRESHOLD`
- `AUDITA_GRAMMAR_CONFIDENCE_THRESHOLD`
2026-05-12 15:19:50 -05:00
CLI:
2026-05-12 13:46:14 +00:00
- `--glossary-confidence-threshold`
- `--homophones-confidence-threshold`
- `--spoken-word-confidence-threshold`
- `--grammar-confidence-threshold`
2026-05-12 15:19:50 -05:00
### Normalization and Chunking
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
Environment:
2026-05-12 13:46:14 +00:00
- `AUDITA_NORMALIZE_MAX_SEGMENT_GAP`
- `AUDITA_NORMALIZE_ELLIPSIS_GAP`
- `AUDITA_NORMALIZE_MAX_SEGMENT_DURATION`
- `AUDITA_NORMALIZE_MAX_SEGMENT_TOKENS`
- `AUDITA_MAX_SECTION_TOKENS`
- `AUDITA_MIN_SECTION_TOKENS`
- `AUDITA_TARGET_SECTIONS`
2026-05-12 15:19:50 -05:00
CLI:
2026-05-12 13:46:14 +00:00
- `--normalize-max-segment-gap`
- `--normalize-ellipsis-gap`
- `--normalize-max-segment-duration`
- `--normalize-max-segment-tokens`
- `--max-section-tokens`
- `--min-section-tokens`
- `--target-sections`
2026-05-12 15:19:50 -05:00
### Work Directory
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
Environment:
2026-05-12 13:46:14 +00:00
- `AUDITA_WORK_DIR`
- `AUDITA_WORK_DIR_RETENTION` (`auto` , `always` , `never` )
2026-05-12 15:19:50 -05:00
CLI:
2026-05-12 13:46:14 +00:00
- `--work-dir`
- `--work-dir-retention`
2026-05-12 15:19:50 -05:00
Retention behavior:
- `always` : keep all run directories
- `never` : keep successful run directories
- `auto` : keep failed runs and successful runs with skipped/rejected corrections
2026-05-12 13:46:14 +00:00
2026-05-12 15:19:50 -05:00
## Reports and Diagnostics
2026-05-12 13:46:14 +00:00
Per-run diagnostics include:
2026-05-12 15:19:50 -05:00
- source transcript artifacts
- normalized transcript artifact
- normalization summary
- chunking summary
- invocation metadata
- redacted effective config
- module/validator prompt-response diagnostics
- `report.json`
- `error.log` on failure
2026-05-12 13:46:14 +00:00
Optional external report output:
- `--report-json <path>`
2026-05-12 15:19:50 -05:00
## Documentation
2026-05-12 13:46:14 +00:00
- Architecture: [`docs/architecture.md` ](docs/architecture.md )
2026-05-13 02:10:24 +00:00
- Structured LLM adapter: [`docs/structured-llm.md` ](docs/structured-llm.md )
2026-05-12 15:19:50 -05:00
- Subprocess operations: [`docs/subprocess-operations.md` ](docs/subprocess-operations.md )