speaker_helper.eval.priors module
Quality priors and Pareto selection for choosing an engine.
Module summary
Two ideas make engine choice operational:
A quality axis even without a reference. When no transcriber is wired in, fidelity is estimated from per-engine priors — order-of-magnitude scores in
[0, 1], recalibrated from real runs. This keeps every evaluation reporting both speed and quality.Pareto selection. To pick an engine/voice you want the non-dominated set on the quality↔RTF plane — high quality and fast.
pareto_front()extracts it.
Together these turn a batch of EvalReport
(one per engine) into an actionable “which engine should I ship?” answer.
Usage example
>>> from speaker_helper.eval.priors import engine_quality_prior
>>> engine_quality_prior("kokoro")
0.75
- speaker_helper.eval.priors.engine_quality_prior(engine)[source]
Return the prior quality score in
[0, 1]for a TTSengine.
- speaker_helper.eval.priors.pareto_front(points)[source]
Return the non-dominated points: maximise quality, minimise RTF.
A point A dominates B if A is at least as good on both axes (higher or equal
quality, lower or equalmean_rtf) and strictly better on one.- Parameters:
points (sequence) – Candidates, each exposing
qualityandmean_rtf(e.g.EvalReport).- Returns:
The Pareto-optimal subset, in input order.
- Return type: