Expand description
The speaking bench: synthesize a corpusβs transcripts, transcribe them back through a caller-supplied recognizer, and score the round trip with its first-audio time, realtime factor and the resident set it needed.
The recognizer is a parameter because this crate is a leaf and owns no model of the other direction.
Re-exportsΒ§
use std::sync::Arc;πuse std::sync::atomic::AtomicBool;πuse std::sync::atomic::AtomicU64;πuse std::sync::atomic::Ordering;πuse std::time::Duration;πuse std::time::Instant;πuse sysinfo::Pid;πuse sysinfo::ProcessesToUpdate;πuse sysinfo::System;πuse crate::Engine;πuse crate::Error;πuse crate::SpeakRequest;π
StructsΒ§
- Bench
Clip - One clip to score: the words to say.
- PeakRss π
- A resident-set sampler that runs beside the bench for its duration.
- TtsBench
Result - What one run measured.
FunctionsΒ§
- edits π
- Word-level Levenshtein distance: the edits between two word sequences.
- ratio π
- Edits over the truthβs own words; a truth with no words is no error rather than a division by zero.
- resident_
bytes π - This processβs resident set, in bytes; zero where the platform will not answer.
- run
- Synthesize every transcript, transcribe the audio back, and score it.
- words π
- A stringβs words: lowercased, split on anything that is not a letter or a digit, blanks dropped.