speaker_helper.eardrum.report module
The report: every take, side by side, for the ear that has the last word.
Module summary
The loop’s scores point; they do not decide. The report puts, for every word, the target pronunciation, each attempt with its score and what the recogniser heard, and the audio — the whole carrier sentence and the word cut out of it — so whoever owns the voice can listen and overrule. Three files:
index.html— self-contained, plays the clips in place;report.json— the same, for scripts;report.md— a summary table for a terminal or a commit message.
Usage example
>>> verdict_label("fixed")
'corrigé'
- speaker_helper.eardrum.report.label(code)[source]
The French label of a reason, origin or source code.
- Parameters:
code (str) – A code from the loop (
"proper","written","builtin"…).- Returns:
Its label, or the code itself when unknown.
- Return type:
Examples
>>> label("proper"), label("zzz") ('nom propre', 'zzz')
- speaker_helper.eardrum.report.render_html(results, meta)[source]
The self-contained HTML report.
- Parameters:
results (list of WordResult) – One per word.
meta (dict) –
engine,language,threshold,date,saved_to.
- Returns:
A complete HTML document.
- Return type:
- speaker_helper.eardrum.report.render_markdown(results, meta)[source]
A summary table in Markdown.
- Parameters:
results (list of WordResult) – One per word.
meta (dict) – As for
render_html().
- Returns:
Markdown.
- Return type:
- speaker_helper.eardrum.report.render_prosody_html(results, meta)[source]
The prosody report: per segment, what the text asks, what the voice did.
- Parameters:
results (list of ExpressionResult) – One per segment.
meta (dict) –
engine,language,date,agreement.
- Returns:
A complete HTML document.
- Return type:
- speaker_helper.eardrum.report.verdict_label(verdict)[source]
The human label of a verdict.
- Parameters:
verdict (str) – A
WordResultverdict.- Returns:
The French label, or the verdict itself when unknown.
- Return type:
- speaker_helper.eardrum.report.write_prosody_report(out_dir, results, meta)[source]
Write
index.htmlandreport.jsonfor a prosody run.- Parameters:
out_dir (Path) – The run’s directory.
results (list of ExpressionResult) – One per segment.
meta (dict) – Run metadata (with
agreement).
- Returns:
The HTML report’s path.
- Return type:
Path
- speaker_helper.eardrum.report.write_report(out_dir, results, meta)[source]
Write
index.html,report.jsonandreport.md.- Parameters:
out_dir (Path) – The run’s directory (audio already inside).
results (list of WordResult) – One per word.
meta (dict) – Run metadata.
- Returns:
The HTML report’s path.
- Return type:
Path