Repository navigation
fix(stt): qualify unknown speech before Parakeet dispatch - #23038
Conversation
Use bounded independent audio language detection to preserve the cheap Parakeet route for confident supported speech and send unsupported or uncertain speech to multilingual transcription. Retain durable custody for pre-admitted unsafe units and add synthetic wrong-script regression. Failure-Class: new
Keep language counters in the existing batch_pipeline GMP namespace and prove that the actual sync exporter keeps them. Capture each intake unit's duration before its funded-probe callback crosses the executor boundary. Failure-Class: new
Preload pure language metric modules before the shared sync dependency stub window so test cleanup cannot orphan registered collectors.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Retain the worker proof boundary when new probes are disabled, record the actual configured provider route, and qualify synthetic stack/simulation fixtures through their declared English language adapters.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 917edd2d0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| selected = select_decision(language, decision, get_prerecorded_service) | ||
| provider = get_prerecorded_provider(resolved, selected_service=selected) |
There was a problem hiding this comment.
Propagate the probed provider to callers
When an unknown/multilingual input is confidently detected as a supported language, this selection can replace the caller's initial Modulate choice with Parakeet, but the wrapper returns only the transcript. Voice/PTT callers in utils/chat.py and routers/chat.py call get_prerecorded_service() before transcription and retain that provisional tuple for TranscriptionAttempt, failure classification, and the REST stt_provider/stt_model response. Consequently, supported multilingual audio is executed by Parakeet while failures, telemetry, and client-visible metadata report Modulate/Velma; resolve the provider before callers establish accounting or expose the actual selection alongside the result.
Useful? React with 👍 / 👎.
…; legacy-off probe proof (lead cfcaba) - BasedHardware#23038's intake tests pass a real BatchUnitPolicy: integration's intake records the route with dataclasses.replace (contract (c)), which a SimpleNamespace cannot take. - New test_legacy_off_keeps_language_probe_and_never_parakeet_for_unsupported: with legacy sync draining or dark, a declared unsupported language takes the C8 provider (Modulate) route and never Parakeet; unknown speech is not sent to legacy, runs the bounded language-ID probe on the CPU host and is frozen 'und' when uncertain. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Unknown or multilingual batch speech could produce nonempty Latin phonetics from Parakeet and bypass empty-only recovery. Qualify unknown audio with a bounded independent language probe before choosing the recognizer: confident supported speech keeps Parakeet; unsupported or uncertain speech uses Modulate. Preserve custody and fenced multilingual recovery for pre-admitted unsafe units.
STT_PRERECORDED_LANGUAGE_GUARD_ENABLED; onlyfalsedisables new probes/restores ordinary prerecorded selection. The worker's frozen-language proof barrier and multilingual custody remain active across rollback.Validation: file-isolated
backend/test.shsuites throughomi-heavy: 290 focused checks passed, then 381 checks in all affected CI-file suites passed after merging current main. Coverage includes language probe/error/cap boundaries, actual provider ordering, rollback custody, all seven soak languages, two-provider recovery, sync v2, and simulation goldens without regeneration. Private fleet gate: 154 offline tests passed; first full local preflight passed 36 checks. The first CI run exposed missing language adapters/declarations in synthetic workers and fixture policy compatibility; these were fixed. Exact-head CI and Luna delta review are required before merge.Product acceptance still requires the lead's serving-SHA multilingual soak. Tests use a synthetic corpus and mocked provider transports; no new live vendor transcription or deployed quality claim is made. First-30-second language detection can miss later code switching or a confident classifier error.
Failure-Class: new
Line-Count-Exception: backend/utils/sync/pipeline.py | 3612 -> 3644 | Keep detected provider selection and actual segment/job accounting at the existing fenced dispatch boundary; the reusable detector is extracted to its own module.