fix(#14373): make cloud Whisper STT model deploy-configurable (un-hardcode English-only)#14511
Conversation
The self-hosted Whisper STT path hardcoded the English-only `Systran/faster-whisper-tiny.en`, so non-English speech (the persona corpus spans 10+ languages, and the request already forwards `languageCode`) was transcribed by an English-only model. Add `WHISPER_STT_MODEL` (optional; same default) resolved by a small pure `resolveWhisperSttModel` helper, and name the actual model in the completion log instead of leaving it implicit. whisper-model.test.ts: 4/4, 100% line/func coverage (env override, English-only default, whitespace trim, blank-degrades-to-default). The non-English round-trip itself is a live-Railway assertion (voice-kokoro-whisper-live.test.ts). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lalalune
left a comment
There was a problem hiding this comment.
Reviewed by inspection (own-account, commenting). Clean, well-scoped, honest. Removes the hardcoded English-only Systran/faster-whisper-tiny.en from the cloud /api/v1/voice/stt self-hosted-Whisper path (#14373) — adds an optional WHISPER_STT_MODEL binding (cloud-worker-env.ts, documented) resolved via a pure resolveWhisperSttModel() (env override → English-only default → whitespace-degrades-to-default guard), and names the model in the completion log so ops can tell which ran. The model swap is now a config change, not a code change. 37-line unit test covers all three resolution paths. Default unchanged so zero-config deployments are untouched. Honest evidence scoping: the live non-English round-trip is correctly marked N/A here — it needs a provisioned Railway multilingual Whisper service + real clip, and that contract already lives in voice-kokoro-whisper-live.test.ts (gated on WHISPER_STT_URL); the service provisioning is #14374. This ships the tractable, testable plumbing without faking the live multilingual verification. Note the multilingual model isn't the DEFAULT yet (that's the deploy/#14374 step) — the hardcode blocker is removed and it's now deployable. LGTM.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
❌ PR title does not match the required pattern. Please use one of these formats:
|
Part of #14373. This PR removes the code-level English-only hardcode and misleading plugin knob/log; #14373 should stay open until the live Railway Spanish audio contract is run with provisioned evidence.
Problem
The cloud
/api/v1/voice/sttself-hosted Whisper path hardcodedSystran/faster-whisper-tiny.enwhile also forwardinglanguageCode. That meant non-English speech could silently go through an English-only model. Separately,plugin-elizacloudlogged and documentedELIZAOS_CLOUD_TRANSCRIPTION_MODEL=gpt-5-mini-transcribe, but that setting is not honored by this Cloud route.Change
WHISPER_STT_MODELWorker binding and resolve it throughresolveWhisperSttModel.Systran/faster-whisper-small, so unset config is no longer English-only.ELIZAOS_CLOUD_TRANSCRIPTION_MODELplugin setting, model-registry validation entry, docs row, and misleadingUsing TRANSCRIPTION model: gpt-5-mini-transcribelog.ELIZA_VOICE_LIVE_SPANISH_AUDIO_URL/ELIZA_VOICE_LIVE_SPANISH_EXPECT.Local Proof
Remaining Evidence Before Closing #14373
The live Spanish round-trip is now encoded as a gated contract test, but it was not run in this host because the Spanish audio fixture URL and live Railway credentials/config were not available. The issue should close only after a run like this is attached inline:
N/A - backend STT route/plugin config change; no UI surface changed.N/A - backend STT route/plugin config change; no UI surface changed.N/A - backend STT route/plugin config change; live audio contract logs are the relevant artifact.N/A - live Railway English/Spanish backend logs require ELIZA_VOICE_LIVE_RAILWAY=1 plus a stable Spanish audio fixture on this host; the gated test command is documented above and #14373 remains open until that evidence is attached.N/A - no frontend runtime path changed.N/A - STT backend config only; no agent prompt/planner/model-generation path changed.N/A - no DB/memory/scheduled-task/wallet/file artifact is produced by model selection config.