fix(stt): map cloud-only model names to default local model for faster-whisper#2731
Closed
amethystani wants to merge 1 commit into
Closed
fix(stt): map cloud-only model names to default local model for faster-whisper#2731amethystani wants to merge 1 commit into
amethystani wants to merge 1 commit into
Conversation
…r-whisper The setup wizard writes stt.model: 'whisper-1' to config.yaml (the OpenAI API model name). When the local faster-whisper provider is used, this value is passed directly to WhisperModel(), which crashes with 'Invalid model size whisper-1, expected one of: tiny, base, small, medium, large...' and silently drops the voice message. _transcribe_local_command() already calls _normalize_local_command_model() to guard against this — apply the same normalisation to the _transcribe_local() path. A WARNING log entry is emitted when the substitution happens so users know why their configured model name is being ignored. Closes NousResearch#2544
Contributor
|
Closed in favor of PR #13016 #13016 which fixes the same issue with full test coverage. Your approach of reusing the existing normalize function was correct. Thanks @amethystani! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The setup wizard writes
stt.model: "whisper-1"toconfig.yaml(the OpenAI API model identifier). When the local faster-whisper provider is active, this value was passed directly toWhisperModel()which rejects it with:The crash was swallowed by the caller, so voice messages were silently ignored.
Fix
In
transcribe_audio(), the local provider path now calls_normalize_local_command_model()on the raw model name before passing it to_transcribe_local(). This function already existed and is already used by thelocal_commandpath — it maps any cloud-only model name (whisper-1,gpt-4o-transcribe,whisper-large-v3, …) toDEFAULT_LOCAL_MODEL("base").A
WARNINGlog is emitted when the substitution occurs so users can see why their configured model name is being ignored.Closes #2544