Repository navigation
fix(media): discover whisper.cpp models instead of a test fixture path - #124699
Merged
Merged
Conversation
The auto local-STT default hardcoded
/opt/homebrew/share/whisper-cpp/for-tests-ggml-tiny.bin — a CI
provisioning artifact — as the production whisper model. Real users with
brew-installed whisper-cpp and downloaded models got ready: false
('model file not found'), silently skipping local transcription; test-
provisioned machines transcribed real audio with the worst-quality tiny
fixture with nothing recording that a test artifact was chosen.
Discover ggml-*.bin models across standard install dirs, preferring
non-tiny models; WHISPER_CPP_MODEL stays the explicit override. Not
found now genuinely means no model is installed.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 17, 2026
openclaw#124699) The auto local-STT default hardcoded /opt/homebrew/share/whisper-cpp/for-tests-ggml-tiny.bin — a CI provisioning artifact — as the production whisper model. Real users with brew-installed whisper-cpp and downloaded models got ready: false ('model file not found'), silently skipping local transcription; test- provisioned machines transcribed real audio with the worst-quality tiny fixture with nothing recording that a test artifact was chosen. Discover ggml-*.bin models across standard install dirs, preferring non-tiny models; WHISPER_CPP_MODEL stays the explicit override. Not found now genuinely means no model is installed.
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.
What Problem This Solves
The auto local-STT selection hardcoded
/opt/homebrew/share/whisper-cpp/for-tests-ggml-tiny.bin— a CI provisioning artifact — as the production whisper.cpp model default. Two silent failure modes:brew install whisper-cppand properly downloaded ggml models gotready: false("model file not found") because that exact test-fixture filename doesn't exist — voice notes silently fell through to no local transcription despite a working transcriber being installed.Why This Change Was Made
Replace the fixture literal with discovery: scan the standard whisper-cpp install dirs (
/opt/homebrew/share/whisper-cpp,/usr/local/share/whisper-cpp,/usr/share/whisper-cpp) forggml-*.bin, preferring non-tiny models (larger = better transcription), deterministic name order within a tier.WHISPER_CPP_MODELremains the explicit override. "Model file not found" now genuinely means no model is installed. ThelistDirectoryseam is injected for tests, matching the module's existingresolveBinary/checkExecutableinjection pattern.User Impact
brew install whisper-cpp+ any downloaded ggml model now works out of the box for local voice-note transcription; test fixtures no longer leak into production model selection.Evidence
ggml-base.en.binover tiny + fixture names (fails pre-fix — old code picked the fixture literal), and no-models →ready: falsewith the existing reason string.node scripts/run-vitest.mjs run src/media-understanding— 62 files, 934/944 pass (10 pre-existing skips).