Skip to main content

Module eval

Module eval 

Source
Expand description

Versioned quality evaluation helpers (JOE-1607).

Offline, deterministic metrics for STT (WER/CER) and simple TTS objective checks. Fixture corpora live under evals/ at the repo root.

Structs§

EvalCorpus
Corpus manifest (versioned).
EvalReport
Aggregate report (machine-readable).
SttFixture
One STT reference fixture (text-only; audio path is optional for offline text scoring).
SttScore
STT scoring result for one hypothesis.
TtsFixture
TTS text fixture for pronunciation / chunk-join checks.

Functions§

build_report
Build an aggregate report from scores.
char_error_rate
Character error rate on normalized strings (spaces kept as characters).
normalize_transcript
Normalize text for WER: lowercase, strip punctuation, collapse whitespace.
repetition_ratio
Degeneration proxy: longest run of identical tokens over hypothesis length.
score_stt
Score one STT hypothesis against a fixture.
silence_false_positive
Silence false positive: non-empty hypothesis for an empty reference.
smoke_corpus
Built-in smoke corpus (synthetic text + optional synthetic audio paths).
tts_duration_in_range
Objective TTS duration check (not MOS).
word_error_rate
Word error rate via classic Levenshtein on word tokens.