Freeze independent DTW speech timing diagnostic and startup provenance
This commit is contained in:
1 parent
705500425a
commit
3ac1201909
9 files changed
+250
-27
No files matched your search
@@ -190,8 +190,31 @@ fn eligible(asr: &Value, fixture: &Value) -> Result<(Vec<Value>, Vec<Value>)> {
|
||||
"Normalized ASR segments differ from actual output"
|
||||
);
|
||||
let actual = if token_alignment {
|
||||
let rebuilt =
|
||||
alignment::reconstruct(&window["actual_whisper_json"], offset, duration);
|
||||
let dtw = asr["alignment_policy"] == alignment::DTW_POLICY;
|
||||
if dtw {
|
||||
let ordinary_failed =
|
||||
alignment::reconstruct(&window["actual_whisper_json"], offset, duration)
|
||||
.is_err();
|
||||
ensure!(
|
||||
window.get("ordinary_alignment_validation_error").is_some()
|
||||
== ordinary_failed,
|
||||
"Ordinary token failure evidence inconsistent"
|
||||
);
|
||||
if ordinary_failed {
|
||||
ensure!(
|
||||
window["ordinary_alignment_validation_error"]
|
||||
.as_str()
|
||||
.is_some_and(|error| !error.is_empty()),
|
||||
"Invalid ordinary failure reason"
|
||||
);
|
||||
}
|
||||
}
|
||||
let rebuilt = alignment::reconstruct_mode(
|
||||
&window["actual_whisper_json"],
|
||||
offset,
|
||||
duration,
|
||||
dtw,
|
||||
);
|
||||
if let Some(error) = window.get("alignment_validation_error") {
|
||||
ensure!(
|
||||
error.as_str().is_some_and(|e| !e.is_empty()) && rebuilt.is_err(),
|
||||
@@ -347,10 +370,10 @@ fn main() -> Result<()> {
|
||||
report["quality_score_eligible"] = json!(excluded.is_empty());
|
||||
report["scope"] = json!("Diagnostic ASR segment text retrieval; all five sources compete, original filename titles, exact cosine, max across token windows, no labels in ranking. Source millisecond segment approximation, not word alignment or production integration.");
|
||||
if alignment::enabled(&asr)? {
|
||||
report["scope"] = json!("Diagnostic ordinary token-time sentence retrieval; all five sources compete, original exact recognized text, independently reconstructed approximate token intervals, no labels in ranking; not production integration.");
|
||||
report["alignment_policy"] = json!(alignment::POLICY);
|
||||
report["alignment_policy_sha256"] = json!(alignment::POLICY_SHA);
|
||||
report["alignment_contract_sha256"] = json!(alignment::CONTRACT_SHA);
|
||||
report["scope"] = json!("Diagnostic token-time sentence retrieval; all five sources compete, original exact recognized text, independently reconstructed approximate ordinary intervals or DTW point spans as declared in alignment_policy, no labels in ranking; not production integration.");
|
||||
report["alignment_policy"] = asr["alignment_policy"].clone();
|
||||
report["alignment_policy_sha256"] = asr["alignment_policy_sha256"].clone();
|
||||
report["alignment_contract_sha256"] = asr["alignment_contract_sha256"].clone();
|
||||
}
|
||||
report["phase"] = json!("document_encoding");
|
||||
checkpoint(&output, &report)?;
|
||||
|
||||
Reference in new issue
Block a user