Validate audio stream timelines and add genuine Google transcript diagnostics

This commit is contained in:
karl committed 2026-10-13 10:39:31 +02:00
1 parent 8ef874c609
commit 5eeba29c0d
7 files changed
+1074 -23

No files matched your search

+8
View File
@@ -6,6 +6,13 @@ from pathlib import Path
from run import FIXTURE_SHA
def require_eligible(report):
if report.get("complete") is not True or report.get("quality_score_eligible") is not True:
raise ValueError("Cannot score incomplete runs or reduced/invalid competitor pools")
if report.get("excluded_windows") or report.get("excluded_window_count", 0):
raise ValueError("Cannot score rankings with excluded ASR windows")
def score(fixture, rankings):
queries = [query for query in fixture["queries"] if query["category"] == "video-speech"]
if len(queries) != 8:
@@ -41,6 +48,7 @@ def main():
args = parser.parse_args()
data = args.fixture.read_bytes()
rankings = json.loads(args.rankings.read_text(encoding="utf-8"))
require_eligible(rankings)
digest = hashlib.sha256(data).hexdigest()
if digest != FIXTURE_SHA or rankings["fixture_sha256"] != digest or not rankings.get("asr_report_sha256") or not rankings.get("google_worker_sha256"):
raise ValueError("Missing/mismatched actual ASR/Google provenance")