Repository navigation
test(studio): preserve resident Whisper chat transcription - #10077
Imagineer99 wants to merge 3 commits into
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 409bbc4568
ℹ️ 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".
| status.audio_type !== "whisper" && | ||
| status.audio_type !== "audio_vlm" | ||
| ); | ||
| return Boolean(status.is_audio) && status.audio_type !== "audio_vlm"; |
There was a problem hiding this comment.
Classify Whisper by audio type before the TTS flag
When the resident checkpoint is a GGUF Whisper model, this still returns false: LlamaCppBackend._apply_detected_audio deliberately preserves _audio_type = "whisper" while leaving _is_audio false (studio/backend/core/inference/llama_cpp.py:31607-31612), and /inference/status forwards both through _llama_runtime_fields. Consequently all three adoption paths continue treating that Whisper resident as a chat model and can submit a text-only turn to it. Check audio_type === "whisper" independently of is_audio (while retaining the audio_vlm exception), and cover the real { is_audio: false, audio_type: "whisper" } status shape.
Useful? React with 👍 / 👎.
|
This also makes a resident Whisper checkpoint get dropped by the chat runtime at use-chat-model-runtime.ts:517, which is the model the composer's audio attachment gate at shared-composer.tsx:2368 relies on. Could you confirm in-chat audio transcription still works with a Whisper model resident before I review? |
|
main deliberately exempts whisper here because the chat route branches on it separately, and use-chat-model-runtime.ts:590 would now evict the Audio page's resident Whisper and clear the chat pick; could you confirm what a text turn against a resident Whisper actually returns today, and that the audio-input transcription path in chat still works after this? |
|
You're right: Whisper needs to remain exempt here. A text-only turn against resident Whisper returns HTTP 400 with With Restored the Whisper exception in be33e54 and added regression coverage for adopting/preserving resident Whisper, the text-only 400, and streaming/non-streaming transcript responses. TTS rejection and the cached ASR auto-load exclusion stay in place. Validation: 31 frontend tests and 10 focused backend tests pass. These unit tests stub decoding and the model worker. The original PR guard fails the Whisper adoption checks. Restoring the exception passes them. Also verified live on be33e54 with resident
The initial live audio request exposed a local TorchCodec dependency issue: This removes the PR's behavior change. I've updated the title and description to present the remaining change as regression coverage for the existing Whisper chat contract. |
|
Closing this to trim the backlog. Main already has the intended Whisper behavior; this only adds regression tests. |
Preserve the existing resident Whisper chat transcription behavior. Whisper stays eligible for chat adoption: text-only turns return an explicit HTTP 400 asking for an audio file, while audio uploads return transcript text.
Restore the Whisper exception removed by the initial commit and add regression coverage for adopting a resident Whisper model, retaining an existing selection, the text-only error, and streaming/non-streaming transcription responses. TTS residents remain excluded, and cached ASR models remain excluded from automatic chat loading. The net change is regression coverage, with no product behavior change.
Validation: 31 frontend tests and 10 focused backend tests pass. The original guard fails the Whisper adoption checks, which pass with the exception restored. Python lint, whitespace checks, the worktree audit, and the pre-push gate passed.
Live validation on the PR head also passed with
unsloth/whisper-large-v3on an RTX 5070 Ti: the expected text-only 400, real decoding/resampling of OpenAI Whisper's 11-second JFK FLAC fixture, correct non-streaming and streaming transcription, preserved residency, and audio upload/rendered transcription through Chromium's chat UI. Warm API streaming took 4.81 seconds; the UI reported 5.14 seconds. The live run used no decoder/inference stubs. The local environment initially lacked TorchCodec'slibnppicc.so.13; NVIDIA NPP 13.0.2.21 was added only to the disposable test runtime to complete validation.