Strip "Release" subfolder when unpacking whisper.cpp engines (#12220)#12378
Merged
Conversation
The Windows whisper.cpp CPU build (whisper-blas-bin-x64.zip from ggml-org v1.9.1) nests all binaries under a "Release/" folder, so whisper-cli.exe landed in Cpp/Release/ instead of Cpp/ and the engine failed to start. Set UnpackSkipFolder to "Release" on WhisperEngineCpp and WhisperEngineCppVulkan (WhisperEngineCppCuBlas already did this). This is safe cross-platform: the unpacker only strips the prefix from entries that actually start with it, so it is a no-op for the flat Mac/Linux and Vulkan archives. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
Reported in #12220: after downloading Whisper (CPU/Cpp) on Windows,
whisper-cli.exeended up in aReleasesub-folder insideCpp(Cpp/Release/whisper-cli.exe) instead of directly inCpp/, so Subtitle Edit could not start the engine. A user confirmed that manually moving the files out ofRelease/fixed it.Root cause
The Windows whisper.cpp CPU build (
whisper-blas-bin-x64.zipfromggml-org/whisper.cppv1.9.1) nests every binary under aRelease/folder.WhisperEngineCpp.UnpackSkipFolderwasstring.Empty, so the unpacker never stripped that prefix.I inspected all the whisper.cpp archives to see which land in a sub-folder:
Release/?UnpackSkipFolder""❌"""""Release"✓"Release"✓""Only the Cpp Windows archive was mis-handled; cuBLAS already got it right.
Fix
Set
UnpackSkipFolder => "Release"onWhisperEngineCppandWhisperEngineCppVulkan(cuBLAS already did this).This is safe cross-platform:
ZipUnpackeronly strips the prefix from entries that actually start with it, so it is a no-op for the flat Mac/Linux and Vulkan archives — exactly how cuBLAS's unconditional"Release"already works on Linux.Notes
Cpp/Release/won't self-heal; a fresh download after this change fixes them (aligns with the Offer re-download when speech-to-text engine exe has gone missing #12363 "re-download when engine file is missing" improvement).WhisperCppEngineTestsdelegation test compares against the backend rather than a hardcoded value, so it's unaffected.🤖 Generated with Claude Code